[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] | 5799981 | 2013-02-24 05:40:52 | [diff] [blame^] | 12 | #include "base/files/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] | c391774 | 2012-11-21 01:51:14 | [diff] [blame] | 25 | #include "chrome/common/search_types.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" |
[email protected] | 17b5a817 | 2012-06-22 21:09:09 | [diff] [blame] | 28 | #include "ipc/ipc_channel_handle.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 29 | #include "ipc/ipc_message_macros.h" |
[email protected] | e7f009d | 2011-06-14 19:35:10 | [diff] [blame] | 30 | #include "ipc/ipc_platform_file.h" |
[email protected] | 1d4ecf4 | 2011-08-26 21:27:30 | [diff] [blame] | 31 | #include "third_party/skia/include/core/SkBitmap.h" |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 32 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 33 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 34 | #include "ui/gfx/rect.h" |
[email protected] | 7a4de7a6 | 2010-08-17 18:38:24 | [diff] [blame] | 35 | |
[email protected] | 44c49c9 | 2011-03-28 16:17:23 | [diff] [blame] | 36 | // Singly-included section for enums and custom IPC traits. |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 37 | #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 38 | #define CHROME_COMMON_RENDER_MESSAGES_H_ |
[email protected] | 049eec2 | 2010-10-20 21:32:52 | [diff] [blame] | 39 | |
[email protected] | 992db4c | 2011-05-12 15:37:15 | [diff] [blame] | 40 | class SkBitmap; |
| 41 | |
[email protected] | a6097f4 | 2011-01-10 08:50:51 | [diff] [blame] | 42 | // Command values for the cmd parameter of the |
| 43 | // ViewHost_JavaScriptStressTestControl message. For each command the parameter |
| 44 | // passed has a different meaning: |
| 45 | // For the command kJavaScriptStressTestSetStressRunType the parameter it the |
| 46 | // type taken from the enumeration v8::Testing::StressType. |
| 47 | // For the command kJavaScriptStressTestPrepareStressRun the parameter it the |
| 48 | // number of the stress run about to take place. |
| 49 | enum ViewHostMsg_JavaScriptStressTestControl_Commands { |
| 50 | kJavaScriptStressTestSetStressRunType = 0, |
| 51 | kJavaScriptStressTestPrepareStressRun = 1, |
| 52 | }; |
| 53 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 54 | // This enum is inside a struct so that we can forward-declare the struct in |
| 55 | // others headers without having to include this one. |
| 56 | struct ChromeViewHostMsg_GetPluginInfo_Status { |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 57 | enum Value { |
| 58 | kAllowed, |
[email protected] | 8aa7a41 | 2011-11-07 12:33:42 | [diff] [blame] | 59 | kBlocked, |
| 60 | kClickToPlay, |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 61 | kDisabled, |
| 62 | kNotFound, |
[email protected] | a119913 | 2012-10-26 22:14:41 | [diff] [blame] | 63 | kNPAPINotSupported, |
[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] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 118 | IPC_ENUM_TRAITS(InstantSizeUnits) |
| 119 | IPC_ENUM_TRAITS(InstantSuggestionType) |
[email protected] | c2c8296 | 2012-10-20 00:02:24 | [diff] [blame] | 120 | IPC_ENUM_TRAITS(InstantShownReason) |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 121 | IPC_ENUM_TRAITS(search_provider::OSDDType) |
| 122 | IPC_ENUM_TRAITS(search_provider::InstallState) |
[email protected] | a682765 | 2012-11-20 23:41:08 | [diff] [blame] | 123 | IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment) |
| 124 | IPC_ENUM_TRAITS(ThemeBackgroundImageTiling) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 125 | IPC_ENUM_TRAITS(TranslateErrors::Type) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 126 | IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 127 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 128 | IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) |
| 129 | IPC_STRUCT_TRAITS_MEMBER(value) |
| 130 | IPC_STRUCT_TRAITS_END() |
| 131 | |
[email protected] | cd33d28 | 2012-09-21 12:53:04 | [diff] [blame] | 132 | // Output parameters for ChromeViewHostMsg_GetPluginInfo message. |
| 133 | IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) |
| 134 | IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) |
| 135 | IPC_STRUCT_MEMBER(webkit::WebPluginInfo, plugin) |
| 136 | IPC_STRUCT_MEMBER(std::string, actual_mime_type) |
| 137 | IPC_STRUCT_MEMBER(std::string, group_identifier) |
| 138 | IPC_STRUCT_MEMBER(string16, group_name) |
| 139 | IPC_STRUCT_END() |
| 140 | |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 141 | IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) |
| 142 | IPC_STRUCT_TRAITS_MEMBER(scheme) |
| 143 | IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard) |
| 144 | IPC_STRUCT_TRAITS_MEMBER(host) |
| 145 | IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard) |
| 146 | IPC_STRUCT_TRAITS_MEMBER(port) |
| 147 | IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard) |
| 148 | IPC_STRUCT_TRAITS_MEMBER(path) |
[email protected] | ae689aab | 2012-01-23 17:52:08 | [diff] [blame] | 149 | IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard) |
[email protected] | 610ca83 | 2011-10-19 12:59:20 | [diff] [blame] | 150 | IPC_STRUCT_TRAITS_END() |
| 151 | |
[email protected] | c1440609 | 2011-10-27 13:43:42 | [diff] [blame] | 152 | IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) |
| 153 | IPC_STRUCT_TRAITS_MEMBER(primary_pattern) |
| 154 | IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) |
| 155 | IPC_STRUCT_TRAITS_MEMBER(setting) |
| 156 | IPC_STRUCT_TRAITS_MEMBER(source) |
| 157 | IPC_STRUCT_TRAITS_MEMBER(incognito) |
| 158 | IPC_STRUCT_TRAITS_END() |
| 159 | |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 160 | IPC_STRUCT_TRAITS_BEGIN(InstantAutocompleteResult) |
| 161 | IPC_STRUCT_TRAITS_MEMBER(provider) |
[email protected] | 6dcd2576 | 2012-11-14 05:31:51 | [diff] [blame] | 162 | IPC_STRUCT_TRAITS_MEMBER(type) |
| 163 | IPC_STRUCT_TRAITS_MEMBER(description) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 164 | IPC_STRUCT_TRAITS_MEMBER(destination_url) |
[email protected] | 404b65f | 2012-12-18 00:52:07 | [diff] [blame] | 165 | IPC_STRUCT_TRAITS_MEMBER(transition) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 166 | IPC_STRUCT_TRAITS_MEMBER(relevance) |
| 167 | IPC_STRUCT_TRAITS_END() |
| 168 | |
[email protected] | dfee2f6 | 2013-02-22 06:46:06 | [diff] [blame] | 169 | IPC_STRUCT_TRAITS_BEGIN(MostVisitedItem) |
| 170 | IPC_STRUCT_TRAITS_MEMBER(url) |
| 171 | IPC_STRUCT_TRAITS_MEMBER(title) |
| 172 | IPC_STRUCT_TRAITS_END() |
| 173 | |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 174 | IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion) |
| 175 | IPC_STRUCT_TRAITS_MEMBER(text) |
| 176 | IPC_STRUCT_TRAITS_MEMBER(behavior) |
| 177 | IPC_STRUCT_TRAITS_MEMBER(type) |
| 178 | IPC_STRUCT_TRAITS_END() |
| 179 | |
[email protected] | c391774 | 2012-11-21 01:51:14 | [diff] [blame] | 180 | IPC_ENUM_TRAITS(chrome::search::Mode::Type) |
| 181 | IPC_ENUM_TRAITS(chrome::search::Mode::Origin) |
| 182 | IPC_STRUCT_TRAITS_BEGIN(chrome::search::Mode) |
| 183 | IPC_STRUCT_TRAITS_MEMBER(mode) |
| 184 | IPC_STRUCT_TRAITS_MEMBER(origin) |
| 185 | IPC_STRUCT_TRAITS_END() |
| 186 | |
[email protected] | 4a7a91bd | 2013-01-10 23:41:04 | [diff] [blame] | 187 | IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams) |
| 188 | IPC_STRUCT_TRAITS_MEMBER(manifest_url) |
| 189 | IPC_STRUCT_TRAITS_MEMBER(render_view_id) |
| 190 | IPC_STRUCT_TRAITS_MEMBER(permission_bits) |
[email protected] | 2e1e6f0 | 2013-01-11 18:22:56 | [diff] [blame] | 191 | IPC_STRUCT_TRAITS_MEMBER(uses_irt) |
[email protected] | 4a7a91bd | 2013-01-10 23:41:04 | [diff] [blame] | 192 | IPC_STRUCT_TRAITS_END() |
| 193 | |
[email protected] | edece21 | 2011-11-16 11:56:56 | [diff] [blame] | 194 | IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) |
| 195 | IPC_STRUCT_TRAITS_MEMBER(image_rules) |
| 196 | IPC_STRUCT_TRAITS_MEMBER(script_rules) |
| 197 | IPC_STRUCT_TRAITS_END() |
| 198 | |
[email protected] | a682765 | 2012-11-20 23:41:08 | [diff] [blame] | 199 | IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo) |
| 200 | IPC_STRUCT_TRAITS_MEMBER(color_r) |
| 201 | IPC_STRUCT_TRAITS_MEMBER(color_g) |
| 202 | IPC_STRUCT_TRAITS_MEMBER(color_b) |
| 203 | IPC_STRUCT_TRAITS_MEMBER(color_a) |
| 204 | IPC_STRUCT_TRAITS_MEMBER(theme_id) |
| 205 | IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment) |
| 206 | IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment) |
[email protected] | e4a379c | 2013-02-15 19:27:19 | [diff] [blame] | 207 | IPC_STRUCT_TRAITS_MEMBER(image_top_offset) |
[email protected] | a682765 | 2012-11-20 23:41:08 | [diff] [blame] | 208 | IPC_STRUCT_TRAITS_MEMBER(image_tiling) |
| 209 | IPC_STRUCT_TRAITS_MEMBER(image_height) |
| 210 | IPC_STRUCT_TRAITS_END() |
| 211 | |
[email protected] | fffaf97 | 2011-03-24 01:34:35 | [diff] [blame] | 212 | IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) |
| 213 | IPC_STRUCT_TRAITS_MEMBER(count) |
| 214 | IPC_STRUCT_TRAITS_MEMBER(size) |
| 215 | IPC_STRUCT_TRAITS_MEMBER(liveSize) |
| 216 | IPC_STRUCT_TRAITS_MEMBER(decodedSize) |
| 217 | IPC_STRUCT_TRAITS_END() |
| 218 | |
| 219 | IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) |
| 220 | IPC_STRUCT_TRAITS_MEMBER(images) |
| 221 | IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) |
| 222 | IPC_STRUCT_TRAITS_MEMBER(scripts) |
| 223 | IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets) |
| 224 | IPC_STRUCT_TRAITS_MEMBER(fonts) |
| 225 | IPC_STRUCT_TRAITS_END() |
| 226 | |
| 227 | IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats) |
| 228 | IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity) |
| 229 | IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity) |
| 230 | IPC_STRUCT_TRAITS_MEMBER(capacity) |
| 231 | IPC_STRUCT_TRAITS_MEMBER(liveSize) |
| 232 | IPC_STRUCT_TRAITS_MEMBER(deadSize) |
| 233 | IPC_STRUCT_TRAITS_END() |
| 234 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 235 | //----------------------------------------------------------------------------- |
| 236 | // RenderView messages |
| 237 | // These are messages sent from the browser to the renderer process. |
| 238 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 239 | // Tells the renderer to set its maximum cache size to the supplied value. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 240 | IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 241 | size_t /* min_dead_capacity */, |
| 242 | size_t /* max_dead_capacity */, |
| 243 | size_t /* capacity */) |
| 244 | |
| 245 | // Tells the renderer to clear the cache. |
[email protected] | e81d4d7 | 2011-09-29 16:54:31 | [diff] [blame] | 246 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache, |
| 247 | bool /* on_navigation */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 248 | |
[email protected] | 5572215 | 2011-03-22 01:33:53 | [diff] [blame] | 249 | // Tells the renderer to dump as much memory as it can, perhaps because we |
| 250 | // have memory pressure or the renderer is (or will be) paged out. This |
| 251 | // should only result in purging objects we can recalculate, e.g. caches or |
| 252 | // JS garbage, not in purging irreplaceable objects. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 253 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory) |
[email protected] | 5572215 | 2011-03-22 01:33:53 | [diff] [blame] | 254 | |
[email protected] | 350019f | 2011-08-02 04:18:33 | [diff] [blame] | 255 | // For WebUI testing, this message stores parameters to do ScriptEvalRequest at |
| 256 | // a time which is late enough to not be thrown out, and early enough to be |
| 257 | // before onload events are fired. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 258 | IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript, |
[email protected] | 350019f | 2011-08-02 04:18:33 | [diff] [blame] | 259 | string16, /* frame_xpath */ |
| 260 | string16, /* jscript_url */ |
| 261 | int, /* ID */ |
| 262 | bool /* If true, result is sent back. */) |
| 263 | |
[email protected] | 5572215 | 2011-03-22 01:33:53 | [diff] [blame] | 264 | // Tells the render view to capture a thumbnail image of the page. The |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 265 | // render view responds with a ChromeViewHostMsg_Snapshot. |
| 266 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_CaptureSnapshot) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 267 | |
[email protected] | edece21 | 2011-11-16 11:56:56 | [diff] [blame] | 268 | // Set the content setting rules stored by the renderer. |
| 269 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules, |
| 270 | RendererContentSettingRules /* rules */) |
[email protected] | c1440609 | 2011-10-27 13:43:42 | [diff] [blame] | 271 | |
[email protected] | 51ffaf7 | 2012-05-09 21:00:49 | [diff] [blame] | 272 | // Tells the render view to load all blocked plugins with the given identifier. |
| 273 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins, |
| 274 | std::string /* identifier */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 275 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 276 | // Asks the renderer to send back stats on the WebCore cache broken down by |
| 277 | // resource types. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 278 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 279 | |
[email protected] | 63a8ba1 | 2011-04-29 05:42:22 | [diff] [blame] | 280 | // Tells the renderer to create a FieldTrial, and by using a 100% probability |
| 281 | // for the FieldTrial, forces the FieldTrial to have assigned group name. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 282 | IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup, |
[email protected] | 63a8ba1 | 2011-04-29 05:42:22 | [diff] [blame] | 283 | std::string /* field trial name */, |
| 284 | std::string /* group name that was assigned. */) |
| 285 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 286 | // Asks the renderer to send back V8 heap stats. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 287 | IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 288 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 289 | // Posts a message to the renderer. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 290 | IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 291 | std::string /* The message */, |
| 292 | std::string /* The origin */, |
| 293 | std::string /* The target*/) |
| 294 | |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 295 | IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 296 | string16 /* value */, |
| 297 | bool /* verbatim */, |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame] | 298 | size_t /* selection_start */, |
| 299 | size_t /* selection_end */) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 300 | |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame] | 301 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit, |
| 302 | string16 /* value */) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 303 | |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame] | 304 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel, |
| 305 | string16 /* value */) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 306 | |
[email protected] | ec4aad54 | 2012-12-14 01:11:04 | [diff] [blame] | 307 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPopupResize, |
| 308 | gfx::Rect /* bounds */) |
| 309 | |
| 310 | IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange, |
| 311 | int /* start */, |
| 312 | int /* end */) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 313 | |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame] | 314 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 315 | |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 316 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxAutocompleteResults, |
| 317 | std::vector<InstantAutocompleteResult> |
| 318 | /* native_suggestions */) |
| 319 | |
[email protected] | 056793e | 2012-09-19 00:40:28 | [diff] [blame] | 320 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxUpOrDownKeyPressed, |
| 321 | int /* count */) |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 322 | |
[email protected] | 01b8d650 | 2013-02-15 17:35:55 | [diff] [blame] | 323 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancelSelection, |
| 324 | string16 /* value */) |
| 325 | |
[email protected] | c391774 | 2012-11-21 01:51:14 | [diff] [blame] | 326 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxModeChanged, |
| 327 | chrome::search::Mode /* mode */) |
[email protected] | 0b10c9ff | 2012-10-09 17:31:55 | [diff] [blame] | 328 | |
[email protected] | d812585 | 2012-11-30 00:47:34 | [diff] [blame] | 329 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults, |
| 330 | bool /* display_instant_results */) |
| 331 | |
[email protected] | a682765 | 2012-11-20 23:41:08 | [diff] [blame] | 332 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged, |
| 333 | ThemeBackgroundInfo /* value */) |
| 334 | |
[email protected] | 3ff3a45 | 2012-12-15 21:45:31 | [diff] [blame] | 335 | IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFontInformation, |
| 336 | string16 /* omnibox_font */, |
| 337 | size_t /* omnibox_font_size */) |
| 338 | |
[email protected] | 6a6811a | 2012-12-12 04:18:16 | [diff] [blame] | 339 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxKeyCaptureChanged, |
| 340 | bool /* is_key_capture_enabled */) |
| 341 | |
[email protected] | dfee2f6 | 2013-02-22 06:46:06 | [diff] [blame] | 342 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_InstantMostVisitedItemsChanged, |
| 343 | std::vector<MostVisitedItem> /* items */) |
| 344 | |
| 345 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_InstantDeleteMostVisitedItem, |
| 346 | GURL /* url */) |
| 347 | |
| 348 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_InstantUndoMostVisitedDeletion, |
| 349 | GURL /* url */) |
| 350 | |
| 351 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions) |
| 352 | |
[email protected] | 1138cce | 2011-12-02 21:29:36 | [diff] [blame] | 353 | // Toggles visual muting of the render view area. This is on when a constrained |
| 354 | // window is showing. |
| 355 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized, |
| 356 | bool /* deemphazied */) |
| 357 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 358 | // Tells the renderer to translate the page contents from one language to |
| 359 | // another. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 360 | IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 361 | int /* page id */, |
| 362 | std::string, /* the script injected in the page */ |
| 363 | std::string, /* BCP 47/RFC 5646 language code the page |
| 364 | is in */ |
| 365 | std::string /* BCP 47/RFC 5646 language code to translate |
| 366 | to */) |
| 367 | |
| 368 | // Tells the renderer to revert the text of translated page to its original |
| 369 | // contents. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 370 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 371 | int /* page id */) |
| 372 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 373 | // Sent on process startup to indicate whether this process is running in |
| 374 | // incognito mode. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 375 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 376 | bool /* is_incognito_processs */) |
| 377 | |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 378 | // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 379 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent, |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 380 | bool /* allowed */) |
| 381 | |
| 382 | // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 383 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent, |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 384 | bool /* allowed */) |
| 385 | |
[email protected] | 92d21384 | 2011-11-02 20:09:43 | [diff] [blame] | 386 | // Tells renderer to always enforce mixed content blocking for this host. |
| 387 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost, |
| 388 | std::string /* host */) |
| 389 | |
[email protected] | 8c40da6 | 2011-07-13 22:58:46 | [diff] [blame] | 390 | // Sent when the profile changes the kSafeBrowsingEnabled preference. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 391 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection, |
[email protected] | 8c40da6 | 2011-07-13 22:58:46 | [diff] [blame] | 392 | bool /* enable_phishing_detection */) |
| 393 | |
[email protected] | 83af80b2 | 2011-09-06 18:49:19 | [diff] [blame] | 394 | // This message asks frame sniffer start. |
| 395 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer, |
| 396 | string16 /* frame-name */) |
| 397 | |
[email protected] | 21d89834 | 2011-08-23 18:14:41 | [diff] [blame] | 398 | // JavaScript related messages ----------------------------------------------- |
| 399 | |
| 400 | // Notify the JavaScript engine in the render to change its parameters |
| 401 | // while performing stress testing. |
| 402 | IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl, |
| 403 | int /* cmd */, |
| 404 | int /* param */) |
| 405 | |
[email protected] | a1127f8 | 2011-09-08 17:27:01 | [diff] [blame] | 406 | // Asks the renderer to send back FPS. |
| 407 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS) |
| 408 | |
[email protected] | 6f9f7d8 | 2011-12-08 12:13:34 | [diff] [blame] | 409 | // Tells the view it is displaying an interstitial page. |
| 410 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial) |
| 411 | |
[email protected] | a1a7ff3 | 2012-07-19 14:03:51 | [diff] [blame] | 412 | // Tells the renderer to suspend/resume the webkit timers. |
| 413 | IPC_MESSAGE_CONTROL1(ChromeViewMsg_ToggleWebKitSharedTimer, |
| 414 | bool /* suspend */) |
| 415 | |
[email protected] | 7e771bfb | 2013-01-14 23:23:21 | [diff] [blame] | 416 | // Provides the renderer with the results of the browser's investigation into |
| 417 | // why a recent main frame load failed (currently, just DNS probe result). |
| 418 | // NetErrorHelper will receive this mesage and replace or update the error |
| 419 | // page with more specific troubleshooting suggestions. |
| 420 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo, |
| 421 | int /* DNS probe result */) |
| 422 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 423 | //----------------------------------------------------------------------------- |
[email protected] | 63f7213 | 2012-04-18 18:02:44 | [diff] [blame] | 424 | // Misc messages |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 425 | // These are messages sent from the renderer to the browser process. |
| 426 | |
[email protected] | 93b9d69 | 2011-04-13 00:44:31 | [diff] [blame] | 427 | // Provides the contents for the given page that was loaded recently. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 428 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageContents, |
[email protected] | 93b9d69 | 2011-04-13 00:44:31 | [diff] [blame] | 429 | GURL /* URL of the page */, |
| 430 | int32 /* page id */, |
| 431 | string16 /* page contents */) |
| 432 | |
| 433 | // Notification that the language for the tab has been determined. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 434 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined, |
[email protected] | 93b9d69 | 2011-04-13 00:44:31 | [diff] [blame] | 435 | std::string /* page ISO639_1 language code */, |
| 436 | bool /* whether the page can be translated */) |
| 437 | |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 438 | IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 439 | WebKit::WebCache::UsageStats /* stats */) |
| 440 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 441 | // Tells the browser that content in the current page was blocked due to the |
| 442 | // user's content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 443 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 444 | ContentSettingsType, /* type of blocked content */ |
| 445 | std::string /* resource identifier */) |
| 446 | |
[email protected] | 5327dfb | 2011-05-03 17:50:36 | [diff] [blame] | 447 | // Sent by the renderer process to check whether access to web databases is |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 448 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 449 | IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase, |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 450 | int /* render_view_id */, |
| 451 | GURL /* origin_url */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 452 | GURL /* top origin url */, |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 453 | string16 /* database name */, |
| 454 | string16 /* database display name */, |
[email protected] | 8c27664 | 2011-05-06 09:41:00 | [diff] [blame] | 455 | bool /* allowed */) |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 456 | |
| 457 | // Sent by the renderer process to check whether access to DOM Storage is |
| 458 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 459 | IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage, |
[email protected] | bac33eb | 2011-05-04 01:47:49 | [diff] [blame] | 460 | int /* render_view_id */, |
| 461 | GURL /* origin_url */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 462 | GURL /* top origin url */, |
[email protected] | c729db8 | 2011-11-23 17:37:27 | [diff] [blame] | 463 | bool /* if true local storage, otherwise session */, |
[email protected] | 8c27664 | 2011-05-06 09:41:00 | [diff] [blame] | 464 | bool /* allowed */) |
[email protected] | 5327dfb | 2011-05-03 17:50:36 | [diff] [blame] | 465 | |
[email protected] | 45316d6 | 2011-05-12 18:15:30 | [diff] [blame] | 466 | // Sent by the renderer process to check whether access to FileSystem is |
| 467 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 468 | IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem, |
[email protected] | 45316d6 | 2011-05-12 18:15:30 | [diff] [blame] | 469 | int /* render_view_id */, |
| 470 | GURL /* origin_url */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 471 | GURL /* top origin url */, |
[email protected] | 45316d6 | 2011-05-12 18:15:30 | [diff] [blame] | 472 | bool /* allowed */) |
| 473 | |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 474 | // Sent by the renderer process to check whether access to Indexed DBis |
| 475 | // granted by content settings. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 476 | IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB, |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 477 | int /* render_view_id */, |
[email protected] | c0a45a98 | 2011-05-25 16:58:15 | [diff] [blame] | 478 | GURL /* origin_url */, |
| 479 | GURL /* top origin url */, |
[email protected] | 9a611a9 | 2011-05-07 17:06:18 | [diff] [blame] | 480 | string16 /* database name */, |
| 481 | bool /* allowed */) |
[email protected] | 5327dfb | 2011-05-03 17:50:36 | [diff] [blame] | 482 | |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 483 | // Return information about a plugin for the given URL and MIME type. |
| 484 | // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows |
| 485 | // about specific reasons why a plug-in can't be used, for example because it's |
| 486 | // disabled. |
[email protected] | cd33d28 | 2012-09-21 12:53:04 | [diff] [blame] | 487 | IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo, |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 488 | int /* render_view_id */, |
| 489 | GURL /* url */, |
| 490 | GURL /* top origin url */, |
| 491 | std::string /* mime_type */, |
[email protected] | cd33d28 | 2012-09-21 12:53:04 | [diff] [blame] | 492 | ChromeViewHostMsg_GetPluginInfo_Output /* output */) |
[email protected] | 51b63f6 | 2011-10-05 18:55:42 | [diff] [blame] | 493 | |
[email protected] | 43b7eaca | 2012-01-12 17:27:28 | [diff] [blame] | 494 | #if defined(ENABLE_PLUGIN_INSTALLATION) |
[email protected] | 1d697f3 | 2011-11-28 11:57:51 | [diff] [blame] | 495 | // Tells the browser to search for a plug-in that can handle the given MIME |
| 496 | // type. The result will be sent asynchronously to the routing ID |
| 497 | // |placeholder_id|. |
| 498 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin, |
| 499 | int /* placeholder_id */, |
| 500 | std::string /* mime_type */) |
| 501 | |
[email protected] | 3240d250 | 2012-01-26 17:00:33 | [diff] [blame] | 502 | // Notifies the browser that a missing plug-in placeholder has been removed, so |
[email protected] | e242401 | 2012-02-03 10:26:50 | [diff] [blame] | 503 | // the corresponding PluginPlaceholderHost can be deleted. |
| 504 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost, |
[email protected] | 3240d250 | 2012-01-26 17:00:33 | [diff] [blame] | 505 | int /* placeholder_id */) |
| 506 | |
[email protected] | 1d697f3 | 2011-11-28 11:57:51 | [diff] [blame] | 507 | // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name| |
| 508 | // has been found. |
| 509 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin, |
| 510 | string16 /* plugin_name */) |
| 511 | |
| 512 | // Notifies a missing plug-in placeholder that no plug-in has been found. |
| 513 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin) |
| 514 | |
[email protected] | 0dd9e8b | 2012-01-04 13:36:16 | [diff] [blame] | 515 | // Notifies a missing plug-in placeholder that we have started downloading |
| 516 | // the plug-in. |
| 517 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin) |
| 518 | |
| 519 | // Notifies a missing plug-in placeholder that we have finished downloading |
| 520 | // the plug-in. |
| 521 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin) |
| 522 | |
[email protected] | 725f688 | 2012-01-13 18:50:06 | [diff] [blame] | 523 | // Notifies a missing plug-in placeholder that there was an error downloading |
| 524 | // the plug-in. |
| 525 | IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin, |
| 526 | std::string /* message */) |
[email protected] | 4f62d805 | 2012-01-18 16:16:59 | [diff] [blame] | 527 | #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| 528 | |
[email protected] | 1a86f75 | 2012-02-10 13:20:36 | [diff] [blame] | 529 | // Notifies a missing plug-in placeholder that the user cancelled downloading |
| 530 | // the plug-in. |
| 531 | IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin) |
| 532 | |
[email protected] | 4f62d805 | 2012-01-18 16:16:59 | [diff] [blame] | 533 | // Tells the browser to open chrome://plugins in a new tab. We use a separate |
| 534 | // message because renderer processes aren't allowed to directly navigate to |
| 535 | // chrome:// URLs. |
| 536 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins) |
[email protected] | 725f688 | 2012-01-13 18:50:06 | [diff] [blame] | 537 | |
[email protected] | cc5f781 | 2012-05-31 13:50:34 | [diff] [blame] | 538 | // Tells the browser that there was an error loading a plug-in. |
| 539 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin, |
[email protected] | a732916 | 2013-02-07 19:21:48 | [diff] [blame] | 540 | base::FilePath /* plugin_path */) |
[email protected] | cc5f781 | 2012-05-31 13:50:34 | [diff] [blame] | 541 | |
[email protected] | a119913 | 2012-10-26 22:14:41 | [diff] [blame] | 542 | // Tells the browser that we blocked a plug-in because NPAPI is not supported. |
| 543 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported, |
| 544 | std::string /* identifer */) |
| 545 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 546 | // Send a snapshot of the tab contents to the render host. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 547 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 548 | SkBitmap /* bitmap */) |
| 549 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 550 | // A message for an external host. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 551 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 552 | std::string /* message */, |
| 553 | std::string /* origin */, |
| 554 | std::string /* target */) |
| 555 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 556 | // A renderer sends this to the browser process when it wants to start |
| 557 | // a new instance of the Native Client process. The browser will launch |
[email protected] | 17b5a817 | 2012-06-22 21:09:09 | [diff] [blame] | 558 | // the process and return an IPC channel handle. This handle will only |
| 559 | // be valid if the NaCl IPC proxy is enabled. |
[email protected] | 4a7a91bd | 2013-01-10 23:41:04 | [diff] [blame] | 560 | IPC_SYNC_MESSAGE_CONTROL1_4(ChromeViewHostMsg_LaunchNaCl, |
| 561 | nacl::NaClLaunchParams /* launch_params */, |
[email protected] | 6294dd0 | 2013-01-09 17:27:23 | [diff] [blame] | 562 | nacl::FileDescriptor /* imc channel handle */, |
[email protected] | 2b7197b | 2012-10-23 21:54:42 | [diff] [blame] | 563 | IPC::ChannelHandle /* ipc_channel_handle */, |
[email protected] | 108fd34 | 2013-01-04 20:46:54 | [diff] [blame] | 564 | base::ProcessId /* plugin_pid */, |
[email protected] | 2b7197b | 2012-10-23 21:54:42 | [diff] [blame] | 565 | int /* plugin_child_id */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 566 | |
[email protected] | 9a80715 | 2012-07-30 17:13:01 | [diff] [blame] | 567 | // A renderer sends this to the browser process when it wants to |
[email protected] | 1787bb4 | 2012-07-23 22:26:50 | [diff] [blame] | 568 | // open a file for from the Pnacl component directory. |
| 569 | IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetReadonlyPnaclFD, |
| 570 | std::string /* name of requested PNaCl file */, |
| 571 | IPC::PlatformFileForTransit /* output file */) |
| 572 | |
[email protected] | 9a80715 | 2012-07-30 17:13:01 | [diff] [blame] | 573 | // A renderer sends this to the browser process when it wants to |
| 574 | // create a temporary file. |
| 575 | IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_NaClCreateTemporaryFile, |
| 576 | IPC::PlatformFileForTransit /* out file */) |
| 577 | |
[email protected] | 923c116 | 2012-12-14 10:07:46 | [diff] [blame] | 578 | // A renderer sends this to the browser process to display infobar |
| 579 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_NaClErrorStatus, |
| 580 | int /* render_view_id */, |
| 581 | int /* Error ID */) |
| 582 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 583 | // Notification that the page has an OpenSearch description document |
| 584 | // associated with it. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 585 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 586 | int32 /* page_id */, |
| 587 | GURL /* url of OS description document */, |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 588 | search_provider::OSDDType) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 589 | |
| 590 | // Find out if the given url's security origin is installed as a search |
| 591 | // provider. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 592 | IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState, |
[email protected] | c08e793 | 2011-03-29 04:08:14 | [diff] [blame] | 593 | GURL /* page url */, |
| 594 | GURL /* inquiry url */, |
| 595 | search_provider::InstallState /* install */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 596 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 597 | // Sends back stats about the V8 heap. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 598 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 599 | int /* size of heap (allocated from the OS) */, |
| 600 | int /* bytes in use */) |
| 601 | |
| 602 | // Request for a DNS prefetch of the names in the array. |
| 603 | // NameList is typedef'ed std::vector<std::string> |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 604 | IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch, |
[email protected] | 2bf2bd9 | 2011-03-31 07:12:44 | [diff] [blame] | 605 | std::vector<std::string> /* hostnames */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 606 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 607 | // Notifies when a plugin couldn't be loaded because it's outdated. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 608 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin, |
[email protected] | 27c48389 | 2012-02-09 15:59:10 | [diff] [blame] | 609 | int /* placeholder ID */, |
| 610 | std::string /* plug-in group identifier */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 611 | |
[email protected] | e242401 | 2012-02-03 10:26:50 | [diff] [blame] | 612 | // Notifies when a plugin couldn't be loaded because it requires |
| 613 | // user authorization. |
[email protected] | 51ffaf7 | 2012-05-09 21:00:49 | [diff] [blame] | 614 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin, |
| 615 | string16 /* name */, |
| 616 | std::string /* plug-in group identifier */) |
[email protected] | e242401 | 2012-02-03 10:26:50 | [diff] [blame] | 617 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 618 | // Provide the browser process with information about the WebCore resource |
[email protected] | 872ae5b | 2011-05-26 20:20:50 | [diff] [blame] | 619 | // cache and current renderer framerate. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 620 | IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 621 | WebKit::WebCache::ResourceTypeStats) |
| 622 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 623 | // Notifies the browser that a page has been translated. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 624 | IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated, |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 625 | int, /* page id */ |
| 626 | std::string /* the original language */, |
| 627 | std::string /* the translated language */, |
| 628 | TranslateErrors::Type /* the error type if available */) |
| 629 | |
[email protected] | 16e923d | 2011-04-30 00:41:44 | [diff] [blame] | 630 | // Message sent from the renderer to the browser to notify it of events which |
| 631 | // may lead to the cancellation of a prerender. The message is sent only when |
| 632 | // the renderer is prerendering. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 633 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media) |
[email protected] | 16e923d | 2011-04-30 00:41:44 | [diff] [blame] | 634 | |
[email protected] | 4c94b8c | 2011-05-17 16:17:45 | [diff] [blame] | 635 | // Message sent from the renderer to the browser to notify it of a |
| 636 | // window.print() call which should cancel the prerender. The message is sent |
| 637 | // only when the renderer is prerendering. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 638 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) |
[email protected] | 4c94b8c | 2011-05-17 16:17:45 | [diff] [blame] | 639 | |
[email protected] | ab2eb9f | 2011-05-03 23:02:37 | [diff] [blame] | 640 | // Sent by the renderer to check if a URL has permission to trigger a clipboard |
| 641 | // read/write operation from the DOM. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 642 | IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead, |
[email protected] | 34eec7ffe3 | 2011-11-02 23:49:02 | [diff] [blame] | 643 | GURL /* origin */, |
[email protected] | ab2eb9f | 2011-05-03 23:02:37 | [diff] [blame] | 644 | bool /* allowed */) |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 645 | IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite, |
[email protected] | 34eec7ffe3 | 2011-11-02 23:49:02 | [diff] [blame] | 646 | GURL /* origin */, |
[email protected] | ab2eb9f | 2011-05-03 23:02:37 | [diff] [blame] | 647 | bool /* allowed */) |
| 648 | |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 649 | // Sent when the renderer was prevented from displaying insecure content in |
| 650 | // a secure page by a security policy. The page may appear incomplete. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 651 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent) |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 652 | |
| 653 | // Sent when the renderer was prevented from running insecure content in |
| 654 | // a secure origin by a security policy. The page may appear incomplete. |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 655 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) |
[email protected] | 68cafdb | 2011-06-10 21:42:18 | [diff] [blame] | 656 | |
[email protected] | 2d0f2e9 | 2011-10-03 09:02:24 | [diff] [blame] | 657 | // Message sent from renderer to the browser when the element that is focused |
[email protected] | e15ad75 | 2012-12-21 19:12:02 | [diff] [blame] | 658 | // has been touched. A bool is passed in this message which indicates if the |
| 659 | // node is editable. |
| 660 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched, |
| 661 | bool /* editable */) |
[email protected] | 2d0f2e9 | 2011-10-03 09:02:24 | [diff] [blame] | 662 | |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 663 | // Suggest results ----------------------------------------------------------- |
| 664 | |
[email protected] | 74a237fb | 2013-02-15 04:17:18 | [diff] [blame] | 665 | // Sent by Instant to populate the omnibox with query suggestions. |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 666 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetSuggestions, |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame] | 667 | int /* page_id */, |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 668 | std::vector<InstantSuggestion> /* suggestions */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 669 | |
[email protected] | 74a237fb | 2013-02-15 04:17:18 | [diff] [blame] | 670 | // Sent by Instant to indicate whether the page supports the Instant API |
| 671 | // (http://dev.chromium.org/searchbox). |
[email protected] | 2ccf45c | 2011-08-19 23:35:50 | [diff] [blame] | 672 | IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined, |
[email protected] | c55e3b8 | 2012-08-09 15:27:05 | [diff] [blame] | 673 | int /* page_id */, |
| 674 | bool /* result */) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 675 | |
[email protected] | e3033eb | 2012-12-13 23:46:08 | [diff] [blame] | 676 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SearchBoxNavigate, |
| 677 | int /* page_id */, |
| 678 | GURL /* destination */, |
| 679 | content::PageTransition /* transition */) |
| 680 | |
[email protected] | 74a237fb | 2013-02-15 04:17:18 | [diff] [blame] | 681 | // Sent by the Instant overlay asking to show itself with the given height. |
| 682 | IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_ShowInstantOverlay, |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 683 | int /* page_id */, |
[email protected] | c2c8296 | 2012-10-20 00:02:24 | [diff] [blame] | 684 | InstantShownReason /* reason */, |
[email protected] | 0e7cb68 | 2012-08-15 04:04:38 | [diff] [blame] | 685 | int /* height */, |
| 686 | InstantSizeUnits /* units */) |
| 687 | |
[email protected] | c18cb67 | 2012-12-05 04:42:12 | [diff] [blame] | 688 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StartCapturingKeyStrokes, |
| 689 | int /* page_id */) |
| 690 | |
| 691 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StopCapturingKeyStrokes, |
| 692 | int /* page_id */) |
| 693 | |
[email protected] | 21d89834 | 2011-08-23 18:14:41 | [diff] [blame] | 694 | // The currently displayed PDF has an unsupported feature. |
| 695 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature) |
[email protected] | d5a0483 | 2011-03-12 21:46:26 | [diff] [blame] | 696 | |
[email protected] | 83af80b2 | 2011-09-06 18:49:19 | [diff] [blame] | 697 | // This message indicates the error appeared in the frame. |
| 698 | IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError, |
| 699 | int /* error */) |
| 700 | |
[email protected] | ebce952 | 2011-10-27 19:17:17 | [diff] [blame] | 701 | // This message indicates the monitored frame loading had completed. |
| 702 | IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted) |
| 703 | |
[email protected] | 6a3eede | 2011-08-29 23:48:05 | [diff] [blame] | 704 | // The following messages are used to set and get cookies for ChromeFrame |
| 705 | // processes. |
| 706 | // Used to set a cookie. The cookie is set asynchronously, but will be |
| 707 | // available to a subsequent ChromeViewHostMsg_GetCookies request. |
| 708 | IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie, |
| 709 | GURL /* url */, |
| 710 | GURL /* first_party_for_cookies */, |
| 711 | std::string /* cookie */) |
| 712 | |
| 713 | // Used to get cookies for the given URL. This may block waiting for a |
| 714 | // previous SetCookie message to be processed. |
| 715 | IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, |
| 716 | GURL /* url */, |
| 717 | GURL /* first_party_for_cookies */, |
| 718 | std::string /* cookies */) |
[email protected] | a1127f8 | 2011-09-08 17:27:01 | [diff] [blame] | 719 | |
| 720 | // Provide the browser process with current renderer framerate. |
| 721 | IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, |
| 722 | int /* routing id */, |
| 723 | float /* frames per second */) |