[email protected] | 0dd9e8b | 2012-01-04 13:36:16 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 5 | // Multiply-included file, no traditional include guard. |
| 6 | #include <map> |
| 7 | #include <set> |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
| 11 | #include "base/basictypes.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 12 | #include "base/file_path.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 13 | #include "base/process.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 14 | #include "base/shared_memory.h" |
[email protected] | 4c79e3e | 2009-10-23 18:31:32 | [diff] [blame] | 15 | #include "base/string16.h" |
[email protected] | 6782f83 | 2011-05-10 04:06:00 | [diff] [blame] | 16 | #include "base/stringprintf.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 17 | #include "base/values.h" |
| 18 | #include "build/build_config.h" |
[email protected] | 79d68c6 | 2011-04-15 21:07:03 | [diff] [blame] | 19 | #include "chrome/common/common_param_traits.h" |
[email protected] | c1440609 | 2011-10-27 13:43:42 | [diff] [blame] | 20 | #include "chrome/common/content_settings.h" |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 21 | #include "chrome/common/content_settings_pattern.h" |
[email protected] | 1c9c7fb | 2011-03-11 16:38:38 | [diff] [blame] | 22 | #include "chrome/common/instant_types.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 23 | #include "chrome/common/nacl_types.h" |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 24 | #include "chrome/common/search_provider.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 25 | #include "chrome/common/thumbnail_score.h" |
[email protected] | 152b8ba3 | 2010-03-29 19:40:16 | [diff] [blame] | 26 | #include "chrome/common/translate_errors.h" |
[email protected] | 19a5c744 | 2011-10-21 20:00:41 | [diff] [blame] | 27 | #include "content/public/common/common_param_traits.h" |
| 28 | #include "content/public/common/webkit_param_traits.h" |
[email protected] | 17b5a817 | 2012-06-22 21:09:09 | [diff] [blame] | 29 | #include "ipc/ipc_channel_handle.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 30 | #include "ipc/ipc_message_macros.h" |
[email protected] | e7f009d | 2011-06-14 19:35:10 | [diff] [blame] | 31 | #include "ipc/ipc_platform_file.h" |
[email protected] | 1d4ecf4 | 2011-08-26 21:27:30 | [diff] [blame] | 32 | #include "third_party/skia/include/core/SkBitmap.h" |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 33 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 34 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 35 | #include "ui/gfx/rect.h" |
[email protected] | 7a4de7a6 | 2010-08-17 18:38:24 | [diff] [blame] | 36 | |
[email protected] | 44c49c9 | 2011-03-28 16:17:23 | [diff] [blame] | 37 | // Singly-included section for enums and custom IPC traits. |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 38 | #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 39 | #define CHROME_COMMON_RENDER_MESSAGES_H_ |
[email protected] | 049eec2 | 2010-10-20 21:32:52 | [diff] [blame] | 40 | |
[email protected] | 992db4c | 2011-05-12 15:37:15 | [diff] [blame] | 41 | class SkBitmap; |
| 42 | |
[email protected] | a6097f4 | 2011-01-10 08:50:51 | [diff] [blame] | 43 | // Command values for the cmd parameter of the |
| 44 | // ViewHost_JavaScriptStressTestControl message. For each command the parameter |
| 45 | // passed has a different meaning: |
| 46 | // For the command kJavaScriptStressTestSetStressRunType the parameter it the |
| 47 | // type taken from the enumeration v8::Testing::StressType. |
| 48 | // For the command kJavaScriptStressTestPrepareStressRun the parameter it the |
| 49 | // number of the stress run about to take place. |
| 50 | enum ViewHostMsg_JavaScriptStressTestControl_Commands { |
| 51 | kJavaScriptStressTestSetStressRunType = 0, |
| 52 | kJavaScriptStressTestPrepareStressRun = 1, |
| 53 | }; |
| 54 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 55 | // This enum is inside a struct so that we can forward-declare the struct in |
| 56 | // others headers without having to include this one. |
| 57 | struct ChromeViewHostMsg_GetPluginInfo_Status { |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 58 | enum Value { |
| 59 | kAllowed, |
[email protected] | 8aa7a41 | 2011-11-07 12:33:42 | [diff] [blame] | 60 | kBlocked, |
| 61 | kClickToPlay, |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 62 | kDisabled, |
| 63 | kNotFound, |
[email protected] | 8aa7a41 | 2011-11-07 12:33:42 | [diff] [blame] | 64 | kOutdatedBlocked, |
| 65 | kOutdatedDisallowed, |
| 66 | kUnauthorized, |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {} |
| 70 | |
| 71 | Value value; |
| 72 | }; |
| 73 | |
[email protected] | 7d5c3ac | 2009-02-04 08:58:19 | [diff] [blame] | 74 | namespace IPC { |
| 75 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 76 | #if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID) |
[email protected] | 661eb9d | 2009-02-03 02:11:48 | [diff] [blame] | 77 | |
| 78 | // TODO(port): this shouldn't exist. However, the plugin stuff is really using |
| 79 | // HWNDS (NativeView), and making Windows calls based on them. I've not figured |
| 80 | // out the deal with plugins yet. |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 81 | // TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow. |
[email protected] | 661eb9d | 2009-02-03 02:11:48 | [diff] [blame] | 82 | template <> |
| 83 | struct ParamTraits<gfx::NativeView> { |
| 84 | typedef gfx::NativeView param_type; |
[email protected] | 7d5c3ac | 2009-02-04 08:58:19 | [diff] [blame] | 85 | static void Write(Message* m, const param_type& p) { |
[email protected] | 661eb9d | 2009-02-03 02:11:48 | [diff] [blame] | 86 | NOTIMPLEMENTED(); |
| 87 | } |
| 88 | |
[email protected] | ce208f87 | 2012-03-07 20:42:56 | [diff] [blame] | 89 | static bool Read(const Message* m, PickleIterator* iter, param_type* p) { |
[email protected] | 661eb9d | 2009-02-03 02:11:48 | [diff] [blame] | 90 | NOTIMPLEMENTED(); |
| 91 | *p = NULL; |
| 92 | return true; |
| 93 | } |
| 94 | |
[email protected] | 252cad6 | 2010-08-18 18:33:57 | [diff] [blame] | 95 | static void Log(const param_type& p, std::string* l) { |
[email protected] | 93f1052 | 2010-10-31 16:27:48 | [diff] [blame] | 96 | l->append(base::StringPrintf("<gfx::NativeView>")); |
[email protected] | 661eb9d | 2009-02-03 02:11:48 | [diff] [blame] | 97 | } |
| 98 | }; |
| 99 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 100 | #endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID) |
[email protected] | 661eb9d | 2009-02-03 02:11:48 | [diff] [blame] | 101 | |
[email protected] | 7b291f9 | 2009-08-14 05:43:53 | [diff] [blame] | 102 | template <> |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 103 | struct ParamTraits<ContentSettingsPattern> { |
| 104 | typedef ContentSettingsPattern param_type; |
| 105 | static void Write(Message* m, const param_type& p); |
[email protected] | ce208f87 | 2012-03-07 20:42:56 | [diff] [blame] | 106 | static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 107 | static void Log(const param_type& p, std::string* l); |
| 108 | }; |
| 109 | |
[email protected] | b3df5a4 | 2010-05-11 14:31:09 | [diff] [blame] | 110 | } // namespace IPC |
[email protected] | 9f4db51 | 2010-05-10 20:21:41 | [diff] [blame] | 111 | |
[email protected] | 5a52f16 | 2008-08-27 04:15:31 | [diff] [blame] | 112 | #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 113 | |
[email protected] | 778574e | 2011-03-21 22:03:50 | [diff] [blame] | 114 | #define IPC_MESSAGE_START ChromeMsgStart |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 115 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 116 | IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 117 | IPC_ENUM_TRAITS(InstantCompleteBehavior) |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 118 | IPC_ENUM_TRAITS(search_provider::OSDDType) |
| 119 | IPC_ENUM_TRAITS(search_provider::InstallState) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 120 | IPC_ENUM_TRAITS(TranslateErrors::Type) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 121 | IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 122 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 123 | IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) |
| 124 | IPC_STRUCT_TRAITS_MEMBER(value) |
| 125 | IPC_STRUCT_TRAITS_END() |
| 126 | |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 127 | IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) |
| 128 | IPC_STRUCT_TRAITS_MEMBER(scheme) |
| 129 | IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard) |
| 130 | IPC_STRUCT_TRAITS_MEMBER(host) |
| 131 | IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard) |
| 132 | IPC_STRUCT_TRAITS_MEMBER(port) |
| 133 | IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard) |
| 134 | IPC_STRUCT_TRAITS_MEMBER(path) |
[email protected] | ae689aab | 2012-01-23 17:52:08 | [diff] [blame] | 135 | IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard) |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 136 | IPC_STRUCT_TRAITS_END() |
| 137 | |
[email protected] | c1440609 | 2011-10-27 13:43:42 | [diff] [blame] | 138 | IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) |
| 139 | IPC_STRUCT_TRAITS_MEMBER(primary_pattern) |
| 140 | IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) |
| 141 | IPC_STRUCT_TRAITS_MEMBER(setting) |
| 142 | IPC_STRUCT_TRAITS_MEMBER(source) |
| 143 | IPC_STRUCT_TRAITS_MEMBER(incognito) |
| 144 | IPC_STRUCT_TRAITS_END() |
| 145 | |
[email protected] | edece21 | 2011-11-16 11:56:56 | [diff] [blame] | 146 | IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) |
| 147 | IPC_STRUCT_TRAITS_MEMBER(image_rules) |
| 148 | IPC_STRUCT_TRAITS_MEMBER(script_rules) |
| 149 | IPC_STRUCT_TRAITS_END() |
| 150 | |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 151 | IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore) |
| 152 | IPC_STRUCT_TRAITS_MEMBER(boring_score) |
| 153 | IPC_STRUCT_TRAITS_MEMBER(good_clipping) |
| 154 | IPC_STRUCT_TRAITS_MEMBER(at_top) |
| 155 | IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot) |
| 156 | IPC_STRUCT_TRAITS_END() |
| 157 | |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 158 | IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) |
| 159 | IPC_STRUCT_TRAITS_MEMBER(count) |
| 160 | IPC_STRUCT_TRAITS_MEMBER(size) |
| 161 | IPC_STRUCT_TRAITS_MEMBER(liveSize) |
| 162 | IPC_STRUCT_TRAITS_MEMBER(decodedSize) |
| 163 | IPC_STRUCT_TRAITS_END() |
| 164 | |
| 165 | IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) |
| 166 | IPC_STRUCT_TRAITS_MEMBER(images) |
| 167 | IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) |
| 168 | IPC_STRUCT_TRAITS_MEMBER(scripts) |
| 169 | IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets) |
| 170 | IPC_STRUCT_TRAITS_MEMBER(fonts) |
| 171 | IPC_STRUCT_TRAITS_END() |
| 172 | |
| 173 | IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats) |
| 174 | IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity) |
| 175 | IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity) |
| 176 | IPC_STRUCT_TRAITS_MEMBER(capacity) |
| 177 | IPC_STRUCT_TRAITS_MEMBER(liveSize) |
| 178 | IPC_STRUCT_TRAITS_MEMBER(deadSize) |
| 179 | IPC_STRUCT_TRAITS_END() |
| 180 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 181 | //----------------------------------------------------------------------------- |
| 182 | // RenderView messages |
| 183 | // These are messages sent from the browser to the renderer process. |
| 184 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 185 | // Tells the renderer to set its maximum cache size to the supplied value. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 186 | IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 187 | size_t /* min_dead_capacity */, |
| 188 | size_t /* max_dead_capacity */, |
| 189 | size_t /* capacity */) |
| 190 | |
| 191 | // Tells the renderer to clear the cache. |
[email protected] | e81d4d7 | 2011-09-29 16:54:31 | [diff] [blame] | 192 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache, |
| 193 | bool /* on_navigation */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 194 | |
[email protected] | 5572215 | 2011-03-22 01:33:53 | [diff] [blame] | 195 | // Tells the renderer to dump as much memory as it can, perhaps because we |
| 196 | // have memory pressure or the renderer is (or will be) paged out. This |
| 197 | // should only result in purging objects we can recalculate, e.g. caches or |
| 198 | // JS garbage, not in purging irreplaceable objects. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 199 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory) |
[email protected] | 5572215 | 2011-03-22 01:33:53 | [diff] [blame] | 200 | |
[email protected] | 350019f | 2011-08-02 04:18:33 | [diff] [blame] | 201 | // For WebUI testing, this message stores parameters to do ScriptEvalRequest at |
| 202 | // a time which is late enough to not be thrown out, and early enough to be |
| 203 | // before onload events are fired. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 204 | IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript, |
[email protected] | 350019f | 2011-08-02 04:18:33 | [diff] [blame] | 205 | string16, /* frame_xpath */ |
| 206 | string16, /* jscript_url */ |
| 207 | int, /* ID */ |
| 208 | bool /* If true, result is sent back. */) |
| 209 | |
[email protected] | 5572215 | 2011-03-22 01:33:53 | [diff] [blame] | 210 | // Tells the render view to capture a thumbnail image of the page. The |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 211 | // render view responds with a ChromeViewHostMsg_Snapshot. |
| 212 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_CaptureSnapshot) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 213 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 214 | // History system notification that the visited link database has been |
| 215 | // replaced. It has one SharedMemoryHandle argument consisting of the table |
| 216 | // handle. This handle is valid in the context of the renderer |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 217 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_NewTable, |
| 218 | base::SharedMemoryHandle) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 219 | |
| 220 | // History system notification that a link has been added and the link |
| 221 | // coloring state for the given hash must be re-calculated. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 222 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_Add, std::vector<uint64>) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 223 | |
| 224 | // History system notification that one or more history items have been |
| 225 | // deleted, which at this point means that all link coloring state must be |
| 226 | // re-calculated. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 227 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_VisitedLink_Reset) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 228 | |
[email protected] | edece21 | 2011-11-16 11:56:56 | [diff] [blame] | 229 | // Set the content setting rules stored by the renderer. |
| 230 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules, |
| 231 | RendererContentSettingRules /* rules */) |
[email protected] | c1440609 | 2011-10-27 13:43:42 | [diff] [blame] | 232 | |
[email protected] | 51ffaf7 | 2012-05-09 21:00:49 | [diff] [blame] | 233 | // Tells the render view to load all blocked plugins with the given identifier. |
| 234 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins, |
| 235 | std::string /* identifier */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 236 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 237 | // Asks the renderer to send back stats on the WebCore cache broken down by |
| 238 | // resource types. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 239 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 240 | |
[email protected] | 63a8ba1 | 2011-04-29 05:42:22 | [diff] [blame] | 241 | // Tells the renderer to create a FieldTrial, and by using a 100% probability |
| 242 | // for the FieldTrial, forces the FieldTrial to have assigned group name. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 243 | IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup, |
[email protected] | 63a8ba1 | 2011-04-29 05:42:22 | [diff] [blame] | 244 | std::string /* field trial name */, |
| 245 | std::string /* group name that was assigned. */) |
| 246 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 247 | #if defined(USE_TCMALLOC) |
[email protected] | 768e4ff | 2011-08-11 20:29:35 | [diff] [blame] | 248 | // Asks the renderer to enable/disable Tcmalloc heap profiling. |
| 249 | // Note: filename_prefix arg is effectively ignored since the render process |
| 250 | // will be unable to write files to disk. Instead use WriteTcmallocHeapProfile |
| 251 | // to write a profile file. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 252 | IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetTcmallocHeapProfiling, |
[email protected] | 768e4ff | 2011-08-11 20:29:35 | [diff] [blame] | 253 | bool /* enable profiling */, |
| 254 | std::string /* filename prefix for profiles */) |
| 255 | // Asks the renderer to write the Tcmalloc heap profile to a file. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 256 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_WriteTcmallocHeapProfile, |
[email protected] | 768e4ff | 2011-08-11 20:29:35 | [diff] [blame] | 257 | FilePath::StringType /* filepath */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 258 | #endif |
| 259 | |
| 260 | // Asks the renderer to send back V8 heap stats. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 261 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 262 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 263 | // Posts a message to the renderer. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 264 | IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 265 | std::string /* The message */, |
| 266 | std::string /* The origin */, |
| 267 | std::string /* The target*/) |
| 268 | |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 269 | IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 270 | string16 /* value */, |
| 271 | bool /* verbatim */, |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame^] | 272 | size_t /* selection_start */, |
| 273 | size_t /* selection_end */) |
| 274 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit, |
| 275 | string16 /* value */) |
| 276 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel, |
| 277 | string16 /* value */) |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 278 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxResize, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 279 | gfx::Rect /* search_box_bounds */) |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame^] | 280 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 281 | |
[email protected] | 1138cce | 2011-12-02 21:29:36 | [diff] [blame] | 282 | // Toggles visual muting of the render view area. This is on when a constrained |
| 283 | // window is showing. |
| 284 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized, |
| 285 | bool /* deemphazied */) |
| 286 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 287 | // Tells the renderer to translate the page contents from one language to |
| 288 | // another. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 289 | IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 290 | int /* page id */, |
| 291 | std::string, /* the script injected in the page */ |
| 292 | std::string, /* BCP 47/RFC 5646 language code the page |
| 293 | is in */ |
| 294 | std::string /* BCP 47/RFC 5646 language code to translate |
| 295 | to */) |
| 296 | |
| 297 | // Tells the renderer to revert the text of translated page to its original |
| 298 | // contents. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 299 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 300 | int /* page id */) |
| 301 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 302 | // Sent on process startup to indicate whether this process is running in |
| 303 | // incognito mode. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 304 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 305 | bool /* is_incognito_processs */) |
| 306 | |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 307 | // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 308 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent, |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 309 | bool /* allowed */) |
| 310 | |
| 311 | // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 312 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent, |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 313 | bool /* allowed */) |
| 314 | |
[email protected] | 92d21384 | 2011-11-02 20:09:43 | [diff] [blame] | 315 | // Tells renderer to always enforce mixed content blocking for this host. |
| 316 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost, |
| 317 | std::string /* host */) |
| 318 | |
[email protected] | 8c40da6 | 2011-07-13 22:58:46 | [diff] [blame] | 319 | // Sent when the profile changes the kSafeBrowsingEnabled preference. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 320 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection, |
[email protected] | 8c40da6 | 2011-07-13 22:58:46 | [diff] [blame] | 321 | bool /* enable_phishing_detection */) |
| 322 | |
[email protected] | 83af80b2 | 2011-09-06 18:49:19 | [diff] [blame] | 323 | // This message asks frame sniffer start. |
| 324 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer, |
| 325 | string16 /* frame-name */) |
| 326 | |
[email protected] | 21d89834 | 2011-08-23 18:14:41 | [diff] [blame] | 327 | // JavaScript related messages ----------------------------------------------- |
| 328 | |
| 329 | // Notify the JavaScript engine in the render to change its parameters |
| 330 | // while performing stress testing. |
| 331 | IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl, |
| 332 | int /* cmd */, |
| 333 | int /* param */) |
| 334 | |
[email protected] | a1127f8 | 2011-09-08 17:27:01 | [diff] [blame] | 335 | // Asks the renderer to send back FPS. |
| 336 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS) |
| 337 | |
[email protected] | 6f9f7d8 | 2011-12-08 12:13:34 | [diff] [blame] | 338 | // Tells the view it is displaying an interstitial page. |
| 339 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial) |
| 340 | |
[email protected] | a1a7ff3 | 2012-07-19 14:03:51 | [diff] [blame] | 341 | // Tells the renderer to suspend/resume the webkit timers. |
| 342 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_ToggleWebKitSharedTimer, |
| 343 | bool /* suspend */) |
| 344 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 345 | //----------------------------------------------------------------------------- |
[email protected] | 63f7213 | 2012-04-18 18:02:44 | [diff] [blame] | 346 | // Misc messages |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 347 | // These are messages sent from the renderer to the browser process. |
| 348 | |
[email protected] | 93b9d69 | 2011-04-13 00:44:31 | [diff] [blame] | 349 | // Provides the contents for the given page that was loaded recently. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 350 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageContents, |
[email protected] | 93b9d69 | 2011-04-13 00:44:31 | [diff] [blame] | 351 | GURL /* URL of the page */, |
| 352 | int32 /* page id */, |
| 353 | string16 /* page contents */) |
| 354 | |
| 355 | // Notification that the language for the tab has been determined. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 356 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined, |
[email protected] | 93b9d69 | 2011-04-13 00:44:31 | [diff] [blame] | 357 | std::string /* page ISO639_1 language code */, |
| 358 | bool /* whether the page can be translated */) |
| 359 | |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 360 | IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 361 | WebKit::WebCache::UsageStats /* stats */) |
| 362 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 363 | // Tells the browser that content in the current page was blocked due to the |
| 364 | // user's content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 365 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 366 | ContentSettingsType, /* type of blocked content */ |
| 367 | std::string /* resource identifier */) |
| 368 | |
[email protected] | 5327dfb | 2011-05-03 17:50:36 | [diff] [blame] | 369 | // Sent by the renderer process to check whether access to web databases is |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 370 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 371 | IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase, |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 372 | int /* render_view_id */, |
| 373 | GURL /* origin_url */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 374 | GURL /* top origin url */, |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 375 | string16 /* database name */, |
| 376 | string16 /* database display name */, |
[email protected] | 8c27664 | 2011-05-06 09:41:00 | [diff] [blame] | 377 | bool /* allowed */) |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 378 | |
| 379 | // Sent by the renderer process to check whether access to DOM Storage is |
| 380 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 381 | IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage, |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 382 | int /* render_view_id */, |
| 383 | GURL /* origin_url */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 384 | GURL /* top origin url */, |
[email protected] | c729db8 | 2011-11-23 17:37:27 | [diff] [blame] | 385 | bool /* if true local storage, otherwise session */, |
[email protected] | 8c27664 | 2011-05-06 09:41:00 | [diff] [blame] | 386 | bool /* allowed */) |
[email protected] | 5327dfb | 2011-05-03 17:50:36 | [diff] [blame] | 387 | |
[email protected] | 45316d6 | 2011-05-12 18:15:30 | [diff] [blame] | 388 | // Sent by the renderer process to check whether access to FileSystem is |
| 389 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 390 | IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem, |
[email protected] | 45316d6 | 2011-05-12 18:15:30 | [diff] [blame] | 391 | int /* render_view_id */, |
| 392 | GURL /* origin_url */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 393 | GURL /* top origin url */, |
[email protected] | 45316d6 | 2011-05-12 18:15:30 | [diff] [blame] | 394 | bool /* allowed */) |
| 395 | |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 396 | // Sent by the renderer process to check whether access to Indexed DBis |
| 397 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 398 | IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB, |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 399 | int /* render_view_id */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 400 | GURL /* origin_url */, |
| 401 | GURL /* top origin url */, |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 402 | string16 /* database name */, |
| 403 | bool /* allowed */) |
[email protected] | 5327dfb | 2011-05-03 17:50:36 | [diff] [blame] | 404 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 405 | // Return information about a plugin for the given URL and MIME type. |
| 406 | // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows |
| 407 | // about specific reasons why a plug-in can't be used, for example because it's |
| 408 | // disabled. |
| 409 | IPC_SYNC_MESSAGE_CONTROL4_3(ChromeViewHostMsg_GetPluginInfo, |
| 410 | int /* render_view_id */, |
| 411 | GURL /* url */, |
| 412 | GURL /* top origin url */, |
| 413 | std::string /* mime_type */, |
| 414 | ChromeViewHostMsg_GetPluginInfo_Status /* status */, |
| 415 | webkit::WebPluginInfo /* plugin */, |
| 416 | std::string /* actual_mime_type */) |
| 417 | |
[email protected] | 43b7eaca | 2012-01-12 17:27:28 | [diff] [blame] | 418 | #if defined(ENABLE_PLUGIN_INSTALLATION) |
[email protected] | 1d697f3 | 2011-11-28 11:57:51 | [diff] [blame] | 419 | // Tells the browser to search for a plug-in that can handle the given MIME |
| 420 | // type. The result will be sent asynchronously to the routing ID |
| 421 | // |placeholder_id|. |
| 422 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin, |
| 423 | int /* placeholder_id */, |
| 424 | std::string /* mime_type */) |
| 425 | |
[email protected] | 3240d250 | 2012-01-26 17:00:33 | [diff] [blame] | 426 | // Notifies the browser that a missing plug-in placeholder has been removed, so |
[email protected] | e242401 | 2012-02-03 10:26:50 | [diff] [blame] | 427 | // the corresponding PluginPlaceholderHost can be deleted. |
| 428 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost, |
[email protected] | 3240d250 | 2012-01-26 17:00:33 | [diff] [blame] | 429 | int /* placeholder_id */) |
| 430 | |
[email protected] | 1d697f3 | 2011-11-28 11:57:51 | [diff] [blame] | 431 | // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name| |
| 432 | // has been found. |
| 433 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin, |
| 434 | string16 /* plugin_name */) |
| 435 | |
| 436 | // Notifies a missing plug-in placeholder that no plug-in has been found. |
| 437 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin) |
| 438 | |
[email protected] | 0dd9e8b | 2012-01-04 13:36:16 | [diff] [blame] | 439 | // Notifies a missing plug-in placeholder that we have started downloading |
| 440 | // the plug-in. |
| 441 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin) |
| 442 | |
| 443 | // Notifies a missing plug-in placeholder that we have finished downloading |
| 444 | // the plug-in. |
| 445 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin) |
| 446 | |
[email protected] | 725f688 | 2012-01-13 18:50:06 | [diff] [blame] | 447 | // Notifies a missing plug-in placeholder that there was an error downloading |
| 448 | // the plug-in. |
| 449 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin, |
| 450 | std::string /* message */) |
[email protected] | 4f62d805 | 2012-01-18 16:16:59 | [diff] [blame] | 451 | #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| 452 | |
[email protected] | 1a86f75 | 2012-02-10 13:20:36 | [diff] [blame] | 453 | // Notifies a missing plug-in placeholder that the user cancelled downloading |
| 454 | // the plug-in. |
| 455 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin) |
| 456 | |
[email protected] | 4f62d805 | 2012-01-18 16:16:59 | [diff] [blame] | 457 | // Tells the browser to open chrome://plugins in a new tab. We use a separate |
| 458 | // message because renderer processes aren't allowed to directly navigate to |
| 459 | // chrome:// URLs. |
| 460 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins) |
[email protected] | 725f688 | 2012-01-13 18:50:06 | [diff] [blame] | 461 | |
[email protected] | cc5f781 | 2012-05-31 13:50:34 | [diff] [blame] | 462 | // Tells the browser that there was an error loading a plug-in. |
| 463 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin, |
| 464 | FilePath /* plugin_path */) |
| 465 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 466 | // Specifies the URL as the first parameter (a wstring) and thumbnail as |
| 467 | // binary data as the second parameter. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 468 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_Thumbnail, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 469 | GURL /* url */, |
| 470 | ThumbnailScore /* score */, |
| 471 | SkBitmap /* bitmap */) |
| 472 | |
| 473 | // Send a snapshot of the tab contents to the render host. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 474 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 475 | SkBitmap /* bitmap */) |
| 476 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 477 | // A message for an external host. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 478 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 479 | std::string /* message */, |
| 480 | std::string /* origin */, |
| 481 | std::string /* target */) |
| 482 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 483 | // A renderer sends this to the browser process when it wants to start |
| 484 | // a new instance of the Native Client process. The browser will launch |
[email protected] | 17b5a817 | 2012-06-22 21:09:09 | [diff] [blame] | 485 | // the process and return an IPC channel handle. This handle will only |
| 486 | // be valid if the NaCl IPC proxy is enabled. |
| 487 | IPC_SYNC_MESSAGE_CONTROL2_2(ChromeViewHostMsg_LaunchNaCl, |
[email protected] | 87f3559 | 2012-04-08 00:49:16 | [diff] [blame] | 488 | GURL /* manifest_url */, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 489 | int /* socket count */, |
| 490 | std::vector<nacl::FileDescriptor> |
[email protected] | 17b5a817 | 2012-06-22 21:09:09 | [diff] [blame] | 491 | /* imc channel handles */, |
| 492 | IPC::ChannelHandle /* ipc_channel_handle */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 493 | |
[email protected] | 9a80715 | 2012-07-30 17:13:01 | [diff] [blame] | 494 | // A renderer sends this to the browser process when it wants to |
[email protected] | 1787bb4 | 2012-07-23 22:26:50 | [diff] [blame] | 495 | // open a file for from the Pnacl component directory. |
| 496 | IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetReadonlyPnaclFD, |
| 497 | std::string /* name of requested PNaCl file */, |
| 498 | IPC::PlatformFileForTransit /* output file */) |
| 499 | |
[email protected] | 9a80715 | 2012-07-30 17:13:01 | [diff] [blame] | 500 | // A renderer sends this to the browser process when it wants to |
| 501 | // create a temporary file. |
| 502 | IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_NaClCreateTemporaryFile, |
| 503 | IPC::PlatformFileForTransit /* out file */) |
| 504 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 505 | // Notification that the page has an OpenSearch description document |
| 506 | // associated with it. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 507 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 508 | int32 /* page_id */, |
| 509 | GURL /* url of OS description document */, |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 510 | search_provider::OSDDType) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 511 | |
| 512 | // Find out if the given url's security origin is installed as a search |
| 513 | // provider. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 514 | IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState, |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 515 | GURL /* page url */, |
| 516 | GURL /* inquiry url */, |
| 517 | search_provider::InstallState /* install */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 518 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 519 | // Send back histograms as vector of pickled-histogram strings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 520 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RendererHistograms, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 521 | int, /* sequence number of Renderer Histograms. */ |
| 522 | std::vector<std::string>) |
| 523 | |
| 524 | #if defined USE_TCMALLOC |
[email protected] | 768e4ff | 2011-08-11 20:29:35 | [diff] [blame] | 525 | // Send back tcmalloc profile to write to a file. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 526 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK, |
[email protected] | 768e4ff | 2011-08-11 20:29:35 | [diff] [blame] | 527 | FilePath::StringType /* filepath */, |
| 528 | std::string /* heap profile */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 529 | #endif |
| 530 | |
| 531 | // Sends back stats about the V8 heap. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 532 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 533 | int /* size of heap (allocated from the OS) */, |
| 534 | int /* bytes in use */) |
| 535 | |
| 536 | // Request for a DNS prefetch of the names in the array. |
| 537 | // NameList is typedef'ed std::vector<std::string> |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 538 | IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch, |
[email protected] | 2bf2bd9 | 2011-03-31 07:12:44 | [diff] [blame] | 539 | std::vector<std::string> /* hostnames */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 540 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 541 | // Notifies when a plugin couldn't be loaded because it's outdated. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 542 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin, |
[email protected] | 27c48389 | 2012-02-09 15:59:10 | [diff] [blame] | 543 | int /* placeholder ID */, |
| 544 | std::string /* plug-in group identifier */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 545 | |
[email protected] | e242401 | 2012-02-03 10:26:50 | [diff] [blame] | 546 | // Notifies when a plugin couldn't be loaded because it requires |
| 547 | // user authorization. |
[email protected] | 51ffaf7 | 2012-05-09 21:00:49 | [diff] [blame] | 548 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin, |
| 549 | string16 /* name */, |
| 550 | std::string /* plug-in group identifier */) |
[email protected] | e242401 | 2012-02-03 10:26:50 | [diff] [blame] | 551 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 552 | // Provide the browser process with information about the WebCore resource |
[email protected] | 872ae5b | 2011-05-26 20:20:50 | [diff] [blame] | 553 | // cache and current renderer framerate. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 554 | IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 555 | WebKit::WebCache::ResourceTypeStats) |
| 556 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 557 | |
| 558 | // Notifies the browser of the language (ISO 639_1 code language, such as fr, |
| 559 | // en, zh...) of the current page. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 560 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PageLanguageDetermined, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 561 | std::string /* the language */) |
| 562 | |
| 563 | // Notifies the browser that a page has been translated. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 564 | IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 565 | int, /* page id */ |
| 566 | std::string /* the original language */, |
| 567 | std::string /* the translated language */, |
| 568 | TranslateErrors::Type /* the error type if available */) |
| 569 | |
[email protected] | 16e923d | 2011-04-30 00:41:44 | [diff] [blame] | 570 | // Message sent from the renderer to the browser to notify it of events which |
| 571 | // may lead to the cancellation of a prerender. The message is sent only when |
| 572 | // the renderer is prerendering. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 573 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media) |
[email protected] | 16e923d | 2011-04-30 00:41:44 | [diff] [blame] | 574 | |
[email protected] | 4c94b8c | 2011-05-17 16:17:45 | [diff] [blame] | 575 | // Message sent from the renderer to the browser to notify it of a |
| 576 | // window.print() call which should cancel the prerender. The message is sent |
| 577 | // only when the renderer is prerendering. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 578 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) |
[email protected] | 4c94b8c | 2011-05-17 16:17:45 | [diff] [blame] | 579 | |
[email protected] | ab2eb9f | 2011-05-03 23:02:37 | [diff] [blame] | 580 | // Sent by the renderer to check if a URL has permission to trigger a clipboard |
| 581 | // read/write operation from the DOM. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 582 | IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead, |
[email protected] | 34eec7ffe3 | 2011-11-02 23:49:02 | [diff] [blame] | 583 | GURL /* origin */, |
[email protected] | ab2eb9f | 2011-05-03 23:02:37 | [diff] [blame] | 584 | bool /* allowed */) |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 585 | IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite, |
[email protected] | 34eec7ffe3 | 2011-11-02 23:49:02 | [diff] [blame] | 586 | GURL /* origin */, |
[email protected] | ab2eb9f | 2011-05-03 23:02:37 | [diff] [blame] | 587 | bool /* allowed */) |
| 588 | |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 589 | // Sent when the renderer was prevented from displaying insecure content in |
| 590 | // a secure page by a security policy. The page may appear incomplete. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 591 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent) |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 592 | |
| 593 | // Sent when the renderer was prevented from running insecure content in |
| 594 | // a secure origin by a security policy. The page may appear incomplete. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 595 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 596 | |
[email protected] | 2d0f2e9 | 2011-10-03 09:02:24 | [diff] [blame] | 597 | // Message sent from renderer to the browser when the element that is focused |
| 598 | // and currently accepts keyboard input inside the webpage has been touched. |
| 599 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FocusedEditableNodeTouched) |
| 600 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 601 | // Suggest results ----------------------------------------------------------- |
| 602 | |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame^] | 603 | // Sent by the Instant preview to populate the omnibox with query suggestions. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 604 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetSuggestions, |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame^] | 605 | int /* page_id */, |
| 606 | std::vector<string16> /* suggestions */, |
| 607 | InstantCompleteBehavior /* behavior */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 608 | |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame^] | 609 | // Sent by the Instant preview indicating whether the page supports the Instant |
| 610 | // API or not (http://dev.chromium.org/searchbox). |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 611 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined, |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame^] | 612 | int /* page_id */, |
| 613 | bool /* result */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 614 | |
[email protected] | 21d89834 | 2011-08-23 18:14:41 | [diff] [blame] | 615 | // The currently displayed PDF has an unsupported feature. |
| 616 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 617 | |
[email protected] | 83af80b2 | 2011-09-06 18:49:19 | [diff] [blame] | 618 | // This message indicates the error appeared in the frame. |
| 619 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError, |
| 620 | int /* error */) |
| 621 | |
[email protected] | ebce952 | 2011-10-27 19:17:17 | [diff] [blame] | 622 | // This message indicates the monitored frame loading had completed. |
| 623 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted) |
| 624 | |
[email protected] | 6a3eede | 2011-08-29 23:48:05 | [diff] [blame] | 625 | // The following messages are used to set and get cookies for ChromeFrame |
| 626 | // processes. |
| 627 | // Used to set a cookie. The cookie is set asynchronously, but will be |
| 628 | // available to a subsequent ChromeViewHostMsg_GetCookies request. |
| 629 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie, |
| 630 | GURL /* url */, |
| 631 | GURL /* first_party_for_cookies */, |
| 632 | std::string /* cookie */) |
| 633 | |
| 634 | // Used to get cookies for the given URL. This may block waiting for a |
| 635 | // previous SetCookie message to be processed. |
| 636 | IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, |
| 637 | GURL /* url */, |
| 638 | GURL /* first_party_for_cookies */, |
| 639 | std::string /* cookies */) |
[email protected] | a1127f8 | 2011-09-08 17:27:01 | [diff] [blame] | 640 | |
| 641 | // Provide the browser process with current renderer framerate. |
| 642 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, |
| 643 | int /* routing id */, |
| 644 | float /* frames per second */) |