blob: 6001df2b80c1f598d6de90c0db1356032d160985 [file] [log] [blame]
[email protected]0dd9e8b2012-01-04 13:36:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]d5a04832011-03-12 21:46:265// Multiply-included file, no traditional include guard.
6#include <map>
7#include <set>
initial.commit09911bf2008-07-26 23:55:298#include <string>
9#include <vector>
10
11#include "base/basictypes.h"
[email protected]57999812013-02-24 05:40:5212#include "base/files/file_path.h"
[email protected]65654eeb2013-07-17 06:51:2413#include "base/memory/shared_memory.h"
[email protected]f15e58122013-07-23 15:42:3414#include "base/process/process.h"
[email protected]3c8a6b02013-06-11 00:49:4915#include "base/strings/string16.h"
16#include "base/strings/stringprintf.h"
[email protected]d5a04832011-03-12 21:46:2617#include "base/values.h"
18#include "build/build_config.h"
[email protected]b77ddff2013-05-24 07:49:0119#include "chrome/common/autocomplete_match_type.h"
[email protected]79d68c62011-04-15 21:07:0320#include "chrome/common/common_param_traits.h"
[email protected]c14406092011-10-27 13:43:4221#include "chrome/common/content_settings.h"
[email protected]610ca832011-10-19 12:59:2022#include "chrome/common/content_settings_pattern.h"
[email protected]1c9c7fb2011-03-11 16:38:3823#include "chrome/common/instant_types.h"
[email protected]ca98bd32013-04-09 05:16:0524#include "chrome/common/omnibox_focus_state.h"
[email protected]c08e7932011-03-29 04:08:1425#include "chrome/common/search_provider.h"
[email protected]b2ed9c672013-06-06 23:34:0026#include "chrome/common/translate/language_detection_details.h"
27#include "chrome/common/translate/translate_errors.h"
[email protected]512b5bd2013-07-23 20:24:0028#include "components/nacl/common/nacl_types.h"
[email protected]19a5c7442011-10-21 20:00:4129#include "content/public/common/common_param_traits.h"
[email protected]3c71576ce2013-07-23 02:00:0130#include "content/public/common/referrer.h"
[email protected]9b003482013-05-21 14:00:1731#include "content/public/common/top_controls_state.h"
[email protected]17b5a8172012-06-22 21:09:0932#include "ipc/ipc_channel_handle.h"
[email protected]d5a04832011-03-12 21:46:2633#include "ipc/ipc_message_macros.h"
[email protected]e7f009d2011-06-14 19:35:1034#include "ipc/ipc_platform_file.h"
[email protected]1d4ecf42011-08-26 21:27:3035#include "third_party/skia/include/core/SkBitmap.h"
[email protected]2255a9332013-06-17 05:12:3136#include "third_party/WebKit/public/web/WebCache.h"
37#include "third_party/WebKit/public/web/WebConsoleMessage.h"
[email protected]3c3acca2013-02-26 03:07:0738#include "ui/base/window_open_disposition.h"
[email protected]d5a04832011-03-12 21:46:2639#include "ui/gfx/rect.h"
[email protected]7a4de7a62010-08-17 18:38:2440
[email protected]44c49c92011-03-28 16:17:2341// Singly-included section for enums and custom IPC traits.
[email protected]d5a04832011-03-12 21:46:2642#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
43#define CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]049eec22010-10-20 21:32:5244
[email protected]992db4c2011-05-12 15:37:1545class SkBitmap;
46
[email protected]a6097f42011-01-10 08:50:5147// Command values for the cmd parameter of the
48// ViewHost_JavaScriptStressTestControl message. For each command the parameter
49// passed has a different meaning:
50// For the command kJavaScriptStressTestSetStressRunType the parameter it the
51// type taken from the enumeration v8::Testing::StressType.
52// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
53// number of the stress run about to take place.
54enum ViewHostMsg_JavaScriptStressTestControl_Commands {
55 kJavaScriptStressTestSetStressRunType = 0,
56 kJavaScriptStressTestPrepareStressRun = 1,
57};
58
[email protected]51b63f62011-10-05 18:55:4259// This enum is inside a struct so that we can forward-declare the struct in
60// others headers without having to include this one.
61struct ChromeViewHostMsg_GetPluginInfo_Status {
[email protected]51b63f62011-10-05 18:55:4262 enum Value {
63 kAllowed,
[email protected]8aa7a412011-11-07 12:33:4264 kBlocked,
65 kClickToPlay,
[email protected]51b63f62011-10-05 18:55:4266 kDisabled,
67 kNotFound,
[email protected]a1199132012-10-26 22:14:4168 kNPAPINotSupported,
[email protected]8aa7a412011-11-07 12:33:4269 kOutdatedBlocked,
70 kOutdatedDisallowed,
71 kUnauthorized,
[email protected]51b63f62011-10-05 18:55:4272 };
73
74 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {}
75
76 Value value;
77};
78
[email protected]7d5c3ac2009-02-04 08:58:1979namespace IPC {
80
[email protected]9c7453d2012-01-21 00:45:4081#if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
[email protected]661eb9d2009-02-03 02:11:4882
83// TODO(port): this shouldn't exist. However, the plugin stuff is really using
84// HWNDS (NativeView), and making Windows calls based on them. I've not figured
85// out the deal with plugins yet.
[email protected]9c7453d2012-01-21 00:45:4086// TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow.
[email protected]661eb9d2009-02-03 02:11:4887template <>
88struct ParamTraits<gfx::NativeView> {
89 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1990 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4891 NOTIMPLEMENTED();
92 }
93
[email protected]ce208f872012-03-07 20:42:5694 static bool Read(const Message* m, PickleIterator* iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4895 NOTIMPLEMENTED();
96 *p = NULL;
97 return true;
98 }
99
[email protected]252cad62010-08-18 18:33:57100 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:48101 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:48102 }
103};
104
[email protected]9c7453d2012-01-21 00:45:40105#endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
[email protected]661eb9d2009-02-03 02:11:48106
[email protected]7b291f92009-08-14 05:43:53107template <>
[email protected]610ca832011-10-19 12:59:20108struct ParamTraits<ContentSettingsPattern> {
109 typedef ContentSettingsPattern param_type;
110 static void Write(Message* m, const param_type& p);
[email protected]ce208f872012-03-07 20:42:56111 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
[email protected]610ca832011-10-19 12:59:20112 static void Log(const param_type& p, std::string* l);
113};
114
[email protected]b3df5a42010-05-11 14:31:09115} // namespace IPC
[email protected]9f4db512010-05-10 20:21:41116
[email protected]5a52f162008-08-27 04:15:31117#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:26118
[email protected]778574e2011-03-21 22:03:50119#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:26120
[email protected]51b63f62011-10-05 18:55:42121IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value)
[email protected]8d4c276d2013-05-29 19:39:52122IPC_ENUM_TRAITS(OmniboxFocusChangeReason)
[email protected]ca98bd32013-04-09 05:16:05123IPC_ENUM_TRAITS(OmniboxFocusState)
[email protected]c08e7932011-03-29 04:08:14124IPC_ENUM_TRAITS(search_provider::OSDDType)
125IPC_ENUM_TRAITS(search_provider::InstallState)
[email protected]a6827652012-11-20 23:41:08126IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment)
127IPC_ENUM_TRAITS(ThemeBackgroundImageTiling)
[email protected]fffaf972011-03-24 01:34:35128IPC_ENUM_TRAITS(TranslateErrors::Type)
[email protected]fffaf972011-03-24 01:34:35129IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]9b003482013-05-21 14:00:17130IPC_ENUM_TRAITS(content::TopControlsState)
[email protected]fffaf972011-03-24 01:34:35131
[email protected]51b63f62011-10-05 18:55:42132IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status)
133IPC_STRUCT_TRAITS_MEMBER(value)
134IPC_STRUCT_TRAITS_END()
135
[email protected]cd33d282012-09-21 12:53:04136// Output parameters for ChromeViewHostMsg_GetPluginInfo message.
137IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output)
138 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status)
[email protected]d7bd3e52013-07-21 04:29:20139 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin)
[email protected]cd33d282012-09-21 12:53:04140 IPC_STRUCT_MEMBER(std::string, actual_mime_type)
141 IPC_STRUCT_MEMBER(std::string, group_identifier)
142 IPC_STRUCT_MEMBER(string16, group_name)
143IPC_STRUCT_END()
144
[email protected]610ca832011-10-19 12:59:20145IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts)
146 IPC_STRUCT_TRAITS_MEMBER(scheme)
147 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard)
148 IPC_STRUCT_TRAITS_MEMBER(host)
149 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard)
150 IPC_STRUCT_TRAITS_MEMBER(port)
151 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard)
152 IPC_STRUCT_TRAITS_MEMBER(path)
[email protected]ae689aab2012-01-23 17:52:08153 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard)
[email protected]610ca832011-10-19 12:59:20154IPC_STRUCT_TRAITS_END()
155
[email protected]c14406092011-10-27 13:43:42156IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
157 IPC_STRUCT_TRAITS_MEMBER(primary_pattern)
158 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern)
159 IPC_STRUCT_TRAITS_MEMBER(setting)
160 IPC_STRUCT_TRAITS_MEMBER(source)
161 IPC_STRUCT_TRAITS_MEMBER(incognito)
162IPC_STRUCT_TRAITS_END()
163
[email protected]e7868c82013-03-12 03:55:56164IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem)
[email protected]dfee2f62013-02-22 06:46:06165 IPC_STRUCT_TRAITS_MEMBER(url)
166 IPC_STRUCT_TRAITS_MEMBER(title)
167IPC_STRUCT_TRAITS_END()
168
[email protected]edece212011-11-16 11:56:56169IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
170 IPC_STRUCT_TRAITS_MEMBER(image_rules)
171 IPC_STRUCT_TRAITS_MEMBER(script_rules)
172IPC_STRUCT_TRAITS_END()
173
[email protected]a8c28472013-07-17 05:34:29174IPC_STRUCT_TRAITS_BEGIN(RGBAColor)
175 IPC_STRUCT_TRAITS_MEMBER(r)
176 IPC_STRUCT_TRAITS_MEMBER(g)
177 IPC_STRUCT_TRAITS_MEMBER(b)
178 IPC_STRUCT_TRAITS_MEMBER(a)
179IPC_STRUCT_TRAITS_END()
180
[email protected]a6827652012-11-20 23:41:08181IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo)
[email protected]a8c28472013-07-17 05:34:29182 IPC_STRUCT_TRAITS_MEMBER(using_default_theme)
183 IPC_STRUCT_TRAITS_MEMBER(background_color)
184 IPC_STRUCT_TRAITS_MEMBER(text_color)
185 IPC_STRUCT_TRAITS_MEMBER(link_color)
186 IPC_STRUCT_TRAITS_MEMBER(text_color_light)
187 IPC_STRUCT_TRAITS_MEMBER(header_color)
188 IPC_STRUCT_TRAITS_MEMBER(section_border_color)
[email protected]a6827652012-11-20 23:41:08189 IPC_STRUCT_TRAITS_MEMBER(theme_id)
190 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment)
191 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment)
192 IPC_STRUCT_TRAITS_MEMBER(image_tiling)
193 IPC_STRUCT_TRAITS_MEMBER(image_height)
[email protected]5189fa12013-03-20 23:00:05194 IPC_STRUCT_TRAITS_MEMBER(has_attribution)
[email protected]a8c28472013-07-17 05:34:29195 IPC_STRUCT_TRAITS_MEMBER(logo_alternate)
[email protected]a6827652012-11-20 23:41:08196IPC_STRUCT_TRAITS_END()
197
[email protected]fffaf972011-03-24 01:34:35198IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
199 IPC_STRUCT_TRAITS_MEMBER(count)
200 IPC_STRUCT_TRAITS_MEMBER(size)
201 IPC_STRUCT_TRAITS_MEMBER(liveSize)
202 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
203IPC_STRUCT_TRAITS_END()
204
205IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
206 IPC_STRUCT_TRAITS_MEMBER(images)
207 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
208 IPC_STRUCT_TRAITS_MEMBER(scripts)
209 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
210 IPC_STRUCT_TRAITS_MEMBER(fonts)
211IPC_STRUCT_TRAITS_END()
212
213IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
214 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
215 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
216 IPC_STRUCT_TRAITS_MEMBER(capacity)
217 IPC_STRUCT_TRAITS_MEMBER(liveSize)
218 IPC_STRUCT_TRAITS_MEMBER(deadSize)
219IPC_STRUCT_TRAITS_END()
220
[email protected]27eff892013-05-21 16:40:52221IPC_STRUCT_TRAITS_BEGIN(LanguageDetectionDetails)
222 IPC_STRUCT_TRAITS_MEMBER(time)
223 IPC_STRUCT_TRAITS_MEMBER(url)
224 IPC_STRUCT_TRAITS_MEMBER(content_language)
225 IPC_STRUCT_TRAITS_MEMBER(cld_language)
226 IPC_STRUCT_TRAITS_MEMBER(is_cld_reliable)
[email protected]20efbf2f2013-05-31 06:42:37227 IPC_STRUCT_TRAITS_MEMBER(html_root_language)
[email protected]27eff892013-05-21 16:40:52228 IPC_STRUCT_TRAITS_MEMBER(adopted_language)
[email protected]d861d972013-05-30 06:02:31229 IPC_STRUCT_TRAITS_MEMBER(contents)
[email protected]27eff892013-05-21 16:40:52230IPC_STRUCT_TRAITS_END()
231
[email protected]d5a04832011-03-12 21:46:26232//-----------------------------------------------------------------------------
233// RenderView messages
234// These are messages sent from the browser to the renderer process.
235
[email protected]d5a04832011-03-12 21:46:26236// Tells the renderer to set its maximum cache size to the supplied value.
[email protected]2ccf45c2011-08-19 23:35:50237IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities,
[email protected]d5a04832011-03-12 21:46:26238 size_t /* min_dead_capacity */,
239 size_t /* max_dead_capacity */,
240 size_t /* capacity */)
241
242// Tells the renderer to clear the cache.
[email protected]e81d4d72011-09-29 16:54:31243IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache,
244 bool /* on_navigation */)
[email protected]d5a04832011-03-12 21:46:26245
[email protected]55722152011-03-22 01:33:53246// Tells the renderer to dump as much memory as it can, perhaps because we
247// have memory pressure or the renderer is (or will be) paged out. This
248// should only result in purging objects we can recalculate, e.g. caches or
249// JS garbage, not in purging irreplaceable objects.
[email protected]2ccf45c2011-08-19 23:35:50250IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory)
[email protected]55722152011-03-22 01:33:53251
[email protected]350019f2011-08-02 04:18:33252// For WebUI testing, this message stores parameters to do ScriptEvalRequest at
253// a time which is late enough to not be thrown out, and early enough to be
254// before onload events are fired.
[email protected]2ccf45c2011-08-19 23:35:50255IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript,
[email protected]350019f2011-08-02 04:18:33256 string16, /* frame_xpath */
257 string16, /* jscript_url */
258 int, /* ID */
259 bool /* If true, result is sent back. */)
260
[email protected]edece212011-11-16 11:56:56261// Set the content setting rules stored by the renderer.
262IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
263 RendererContentSettingRules /* rules */)
[email protected]c14406092011-10-27 13:43:42264
[email protected]51ffaf72012-05-09 21:00:49265// Tells the render view to load all blocked plugins with the given identifier.
266IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins,
267 std::string /* identifier */)
[email protected]d5a04832011-03-12 21:46:26268
[email protected]d5a04832011-03-12 21:46:26269// Asks the renderer to send back stats on the WebCore cache broken down by
270// resource types.
[email protected]2ccf45c2011-08-19 23:35:50271IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats)
[email protected]d5a04832011-03-12 21:46:26272
[email protected]63a8ba12011-04-29 05:42:22273// Tells the renderer to create a FieldTrial, and by using a 100% probability
274// for the FieldTrial, forces the FieldTrial to have assigned group name.
[email protected]2ccf45c2011-08-19 23:35:50275IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup,
[email protected]63a8ba12011-04-29 05:42:22276 std::string /* field trial name */,
277 std::string /* group name that was assigned. */)
278
[email protected]d5a04832011-03-12 21:46:26279// Asks the renderer to send back V8 heap stats.
[email protected]2ccf45c2011-08-19 23:35:50280IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats)
[email protected]d5a04832011-03-12 21:46:26281
[email protected]d5a04832011-03-12 21:46:26282// Posts a message to the renderer.
[email protected]2ccf45c2011-08-19 23:35:50283IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost,
[email protected]d5a04832011-03-12 21:46:26284 std::string /* The message */,
285 std::string /* The origin */,
286 std::string /* The target*/)
287
[email protected]c55e3b82012-08-09 15:27:05288IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant)
[email protected]d5a04832011-03-12 21:46:26289
[email protected]8d4c276d2013-05-29 19:39:52290IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged,
291 OmniboxFocusState /* new_focus_state */,
292 OmniboxFocusChangeReason /* reason */)
[email protected]6a6811a2012-12-12 04:18:16293
[email protected]38fe2892013-07-11 00:21:04294IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFontInformation,
295 string16 /* omnibox_font */,
296 size_t /* omnibox_font_size */)
297
298IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange,
299 int /* start */,
300 int /* width */)
[email protected]0d0b4a42013-06-14 00:46:26301
[email protected]e7868c82013-03-12 03:55:56302IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged,
[email protected]ab01dd752013-06-08 05:13:36303 std::vector<InstantMostVisitedItem> /* items */)
[email protected]dfee2f62013-02-22 06:46:06304
[email protected]38fe2892013-07-11 00:21:04305IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation,
306 bool /* is_app_launcher_enabled */)
[email protected]dfee2f62013-02-22 06:46:06307
[email protected]38fe2892013-07-11 00:21:04308IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress,
309 bool /* input_in_progress */)
[email protected]dfee2f62013-02-22 06:46:06310
[email protected]38fe2892013-07-11 00:21:04311IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit,
312 string16 /* value */)
313
314IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged,
315 ThemeBackgroundInfo /* value */)
[email protected]dfee2f62013-02-22 06:46:06316
[email protected]3473ae02013-06-07 00:28:08317IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch)
318
[email protected]1138cce2011-12-02 21:29:36319// Toggles visual muting of the render view area. This is on when a constrained
320// window is showing.
321IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
322 bool /* deemphazied */)
323
[email protected]d5a04832011-03-12 21:46:26324// Tells the renderer to translate the page contents from one language to
325// another.
[email protected]2ccf45c2011-08-19 23:35:50326IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage,
[email protected]d5a04832011-03-12 21:46:26327 int /* page id */,
328 std::string, /* the script injected in the page */
329 std::string, /* BCP 47/RFC 5646 language code the page
330 is in */
331 std::string /* BCP 47/RFC 5646 language code to translate
332 to */)
333
334// Tells the renderer to revert the text of translated page to its original
335// contents.
[email protected]2ccf45c2011-08-19 23:35:50336IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation,
[email protected]d5a04832011-03-12 21:46:26337 int /* page id */)
338
[email protected]d5a04832011-03-12 21:46:26339// Sent on process startup to indicate whether this process is running in
340// incognito mode.
[email protected]2ccf45c2011-08-19 23:35:50341IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
[email protected]d5a04832011-03-12 21:46:26342 bool /* is_incognito_processs */)
343
[email protected]24665682013-02-25 20:59:38344// Sent on process startup to indicate whether the extension activity
345// log is enabled.
346IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetExtensionActivityLogEnabled,
347 bool /* extension_activity_log_enabled */)
348
[email protected]68cafdb2011-06-10 21:42:18349// Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50350IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18351 bool /* allowed */)
352
353// Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50354IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18355 bool /* allowed */)
356
[email protected]92d213842011-11-02 20:09:43357// Tells renderer to always enforce mixed content blocking for this host.
358IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost,
359 std::string /* host */)
360
[email protected]8c40da62011-07-13 22:58:46361// Sent when the profile changes the kSafeBrowsingEnabled preference.
[email protected]2ccf45c2011-08-19 23:35:50362IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
[email protected]8c40da62011-07-13 22:58:46363 bool /* enable_phishing_detection */)
364
[email protected]83af80b22011-09-06 18:49:19365// This message asks frame sniffer start.
366IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer,
367 string16 /* frame-name */)
368
[email protected]9b003482013-05-21 14:00:17369// Notifies the renderer whether hiding/showing the top controls is enabled,
370// what the current state should be, and whether or not to animate to the
371// proper state.
372IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState,
373 content::TopControlsState /* constraints */,
374 content::TopControlsState /* current */,
375 bool /* animate */)
376
[email protected]67264062013-07-25 12:39:26377// Updates the window features of the render view.
378IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures,
379 WebKit::WebWindowFeatures /* window_features */)
380
[email protected]21d898342011-08-23 18:14:41381// JavaScript related messages -----------------------------------------------
382
383// Notify the JavaScript engine in the render to change its parameters
384// while performing stress testing.
385IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
386 int /* cmd */,
387 int /* param */)
388
[email protected]a1127f82011-09-08 17:27:01389// Asks the renderer to send back FPS.
390IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS)
391
[email protected]6f9f7d82011-12-08 12:13:34392// Tells the view it is displaying an interstitial page.
393IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial)
394
[email protected]7e771bfb2013-01-14 23:23:21395// Provides the renderer with the results of the browser's investigation into
396// why a recent main frame load failed (currently, just DNS probe result).
397// NetErrorHelper will receive this mesage and replace or update the error
398// page with more specific troubleshooting suggestions.
399IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo,
[email protected]2ea1efe2013-07-17 05:23:13400 int /* DNS probe status */)
[email protected]7e771bfb2013-01-14 23:23:21401
[email protected]d5a04832011-03-12 21:46:26402//-----------------------------------------------------------------------------
[email protected]63f72132012-04-18 18:02:44403// Misc messages
[email protected]d5a04832011-03-12 21:46:26404// These are messages sent from the renderer to the browser process.
405
[email protected]93b9d692011-04-13 00:44:31406// Notification that the language for the tab has been determined.
[email protected]2ccf45c2011-08-19 23:35:50407IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined,
[email protected]27eff892013-05-21 16:40:52408 LanguageDetectionDetails /* details about lang detection */,
409 bool /* whether the page needs translation */)
[email protected]93b9d692011-04-13 00:44:31410
[email protected]2ccf45c2011-08-19 23:35:50411IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats,
[email protected]d5a04832011-03-12 21:46:26412 WebKit::WebCache::UsageStats /* stats */)
413
[email protected]d5a04832011-03-12 21:46:26414// Tells the browser that content in the current page was blocked due to the
415// user's content settings.
[email protected]2ccf45c2011-08-19 23:35:50416IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked,
[email protected]d5a04832011-03-12 21:46:26417 ContentSettingsType, /* type of blocked content */
418 std::string /* resource identifier */)
419
[email protected]5327dfb2011-05-03 17:50:36420// Sent by the renderer process to check whether access to web databases is
[email protected]bac33eb2011-05-04 01:47:49421// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50422IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase,
[email protected]9a611a92011-05-07 17:06:18423 int /* render_view_id */,
424 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15425 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49426 string16 /* database name */,
427 string16 /* database display name */,
[email protected]8c276642011-05-06 09:41:00428 bool /* allowed */)
[email protected]bac33eb2011-05-04 01:47:49429
430// Sent by the renderer process to check whether access to DOM Storage is
431// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50432IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage,
[email protected]bac33eb2011-05-04 01:47:49433 int /* render_view_id */,
434 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15435 GURL /* top origin url */,
[email protected]c729db82011-11-23 17:37:27436 bool /* if true local storage, otherwise session */,
[email protected]8c276642011-05-06 09:41:00437 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36438
[email protected]45316d62011-05-12 18:15:30439// Sent by the renderer process to check whether access to FileSystem is
440// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50441IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem,
[email protected]45316d62011-05-12 18:15:30442 int /* render_view_id */,
443 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15444 GURL /* top origin url */,
[email protected]45316d62011-05-12 18:15:30445 bool /* allowed */)
446
[email protected]9a611a92011-05-07 17:06:18447// Sent by the renderer process to check whether access to Indexed DBis
448// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50449IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB,
[email protected]9a611a92011-05-07 17:06:18450 int /* render_view_id */,
[email protected]c0a45a982011-05-25 16:58:15451 GURL /* origin_url */,
452 GURL /* top origin url */,
[email protected]9a611a92011-05-07 17:06:18453 string16 /* database name */,
454 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36455
[email protected]51b63f62011-10-05 18:55:42456// Return information about a plugin for the given URL and MIME type.
457// In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
458// about specific reasons why a plug-in can't be used, for example because it's
459// disabled.
[email protected]cd33d282012-09-21 12:53:04460IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo,
[email protected]51b63f62011-10-05 18:55:42461 int /* render_view_id */,
462 GURL /* url */,
463 GURL /* top origin url */,
464 std::string /* mime_type */,
[email protected]cd33d282012-09-21 12:53:04465 ChromeViewHostMsg_GetPluginInfo_Output /* output */)
[email protected]51b63f62011-10-05 18:55:42466
[email protected]43b7eaca2012-01-12 17:27:28467#if defined(ENABLE_PLUGIN_INSTALLATION)
[email protected]1d697f32011-11-28 11:57:51468// Tells the browser to search for a plug-in that can handle the given MIME
469// type. The result will be sent asynchronously to the routing ID
470// |placeholder_id|.
471IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin,
472 int /* placeholder_id */,
473 std::string /* mime_type */)
474
[email protected]3240d2502012-01-26 17:00:33475// Notifies the browser that a missing plug-in placeholder has been removed, so
[email protected]e2424012012-02-03 10:26:50476// the corresponding PluginPlaceholderHost can be deleted.
477IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost,
[email protected]3240d2502012-01-26 17:00:33478 int /* placeholder_id */)
479
[email protected]1d697f32011-11-28 11:57:51480// Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
481// has been found.
482IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin,
483 string16 /* plugin_name */)
484
485// Notifies a missing plug-in placeholder that no plug-in has been found.
486IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin)
487
[email protected]0dd9e8b2012-01-04 13:36:16488// Notifies a missing plug-in placeholder that we have started downloading
489// the plug-in.
490IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin)
491
492// Notifies a missing plug-in placeholder that we have finished downloading
493// the plug-in.
494IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin)
495
[email protected]725f6882012-01-13 18:50:06496// Notifies a missing plug-in placeholder that there was an error downloading
497// the plug-in.
498IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin,
499 std::string /* message */)
[email protected]4f62d8052012-01-18 16:16:59500#endif // defined(ENABLE_PLUGIN_INSTALLATION)
501
[email protected]1a86f752012-02-10 13:20:36502// Notifies a missing plug-in placeholder that the user cancelled downloading
503// the plug-in.
504IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin)
505
[email protected]4f62d8052012-01-18 16:16:59506// Tells the browser to open chrome://plugins in a new tab. We use a separate
507// message because renderer processes aren't allowed to directly navigate to
508// chrome:// URLs.
509IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins)
[email protected]725f6882012-01-13 18:50:06510
[email protected]cc5f7812012-05-31 13:50:34511// Tells the browser that there was an error loading a plug-in.
512IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin,
[email protected]a7329162013-02-07 19:21:48513 base::FilePath /* plugin_path */)
[email protected]cc5f7812012-05-31 13:50:34514
[email protected]a1199132012-10-26 22:14:41515// Tells the browser that we blocked a plug-in because NPAPI is not supported.
516IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported,
517 std::string /* identifer */)
518
[email protected]cc7b11012013-05-02 22:02:53519// Tells the renderer that the NPAPI cannot be used. For example Ash on windows.
520IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported)
521
[email protected]d5a04832011-03-12 21:46:26522// A message for an external host.
[email protected]2ccf45c2011-08-19 23:35:50523IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost,
[email protected]d5a04832011-03-12 21:46:26524 std::string /* message */,
525 std::string /* origin */,
526 std::string /* target */)
527
[email protected]d5a04832011-03-12 21:46:26528// Notification that the page has an OpenSearch description document
529// associated with it.
[email protected]2ccf45c2011-08-19 23:35:50530IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD,
[email protected]d5a04832011-03-12 21:46:26531 int32 /* page_id */,
532 GURL /* url of OS description document */,
[email protected]c08e7932011-03-29 04:08:14533 search_provider::OSDDType)
[email protected]d5a04832011-03-12 21:46:26534
535// Find out if the given url's security origin is installed as a search
536// provider.
[email protected]2ccf45c2011-08-19 23:35:50537IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState,
[email protected]c08e7932011-03-29 04:08:14538 GURL /* page url */,
539 GURL /* inquiry url */,
540 search_provider::InstallState /* install */)
[email protected]d5a04832011-03-12 21:46:26541
[email protected]d5a04832011-03-12 21:46:26542// Sends back stats about the V8 heap.
[email protected]2ccf45c2011-08-19 23:35:50543IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats,
[email protected]d5a04832011-03-12 21:46:26544 int /* size of heap (allocated from the OS) */,
545 int /* bytes in use */)
546
547// Request for a DNS prefetch of the names in the array.
548// NameList is typedef'ed std::vector<std::string>
[email protected]2ccf45c2011-08-19 23:35:50549IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch,
[email protected]2bf2bd92011-03-31 07:12:44550 std::vector<std::string> /* hostnames */)
[email protected]d5a04832011-03-12 21:46:26551
[email protected]b1e7562d2013-05-27 05:47:53552// Request for preconnect to host providing resource specified by URL
553IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_Preconnect,
554 GURL /* preconnect target url */)
555
[email protected]d5a04832011-03-12 21:46:26556// Notifies when a plugin couldn't be loaded because it's outdated.
[email protected]2ccf45c2011-08-19 23:35:50557IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin,
[email protected]27c483892012-02-09 15:59:10558 int /* placeholder ID */,
559 std::string /* plug-in group identifier */)
[email protected]d5a04832011-03-12 21:46:26560
[email protected]e2424012012-02-03 10:26:50561// Notifies when a plugin couldn't be loaded because it requires
562// user authorization.
[email protected]51ffaf72012-05-09 21:00:49563IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin,
564 string16 /* name */,
565 std::string /* plug-in group identifier */)
[email protected]e2424012012-02-03 10:26:50566
[email protected]d5a04832011-03-12 21:46:26567// Provide the browser process with information about the WebCore resource
[email protected]872ae5b2011-05-26 20:20:50568// cache and current renderer framerate.
[email protected]2ccf45c2011-08-19 23:35:50569IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats,
[email protected]d5a04832011-03-12 21:46:26570 WebKit::WebCache::ResourceTypeStats)
571
[email protected]d5a04832011-03-12 21:46:26572// Notifies the browser that a page has been translated.
[email protected]2ccf45c2011-08-19 23:35:50573IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated,
[email protected]d5a04832011-03-12 21:46:26574 int, /* page id */
575 std::string /* the original language */,
576 std::string /* the translated language */,
577 TranslateErrors::Type /* the error type if available */)
578
[email protected]16e923d2011-04-30 00:41:44579// Message sent from the renderer to the browser to notify it of events which
580// may lead to the cancellation of a prerender. The message is sent only when
581// the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50582IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media)
[email protected]16e923d2011-04-30 00:41:44583
[email protected]4c94b8c2011-05-17 16:17:45584// Message sent from the renderer to the browser to notify it of a
585// window.print() call which should cancel the prerender. The message is sent
586// only when the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50587IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
[email protected]4c94b8c2011-05-17 16:17:45588
[email protected]ab2eb9f2011-05-03 23:02:37589// Sent by the renderer to check if a URL has permission to trigger a clipboard
590// read/write operation from the DOM.
[email protected]2ccf45c2011-08-19 23:35:50591IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
[email protected]34eec7ffe32011-11-02 23:49:02592 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37593 bool /* allowed */)
[email protected]2ccf45c2011-08-19 23:35:50594IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
[email protected]34eec7ffe32011-11-02 23:49:02595 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37596 bool /* allowed */)
597
[email protected]68cafdb2011-06-10 21:42:18598// Sent when the renderer was prevented from displaying insecure content in
599// a secure page by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50600IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18601
602// Sent when the renderer was prevented from running insecure content in
603// a secure origin by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50604IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18605
[email protected]2d0f2e92011-10-03 09:02:24606// Message sent from renderer to the browser when the element that is focused
[email protected]e15ad752012-12-21 19:12:02607// has been touched. A bool is passed in this message which indicates if the
608// node is editable.
609IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched,
610 bool /* editable */)
[email protected]2d0f2e92011-10-03 09:02:24611
[email protected]21d898342011-08-23 18:14:41612// The currently displayed PDF has an unsupported feature.
613IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
[email protected]d5a04832011-03-12 21:46:26614
[email protected]3c71576ce2013-07-23 02:00:01615// Brings up SaveAs... dialog to save specified URL.
616IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PDFSaveURLAs,
617 GURL /* url */,
618 content::Referrer /* referrer */)
619
620// Updates the content restrictions, i.e. to disable print/copy.
621IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PDFUpdateContentRestrictions,
622 int /* restrictions */)
623
[email protected]83af80b22011-09-06 18:49:19624// This message indicates the error appeared in the frame.
625IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError,
626 int /* error */)
627
[email protected]ebce9522011-10-27 19:17:17628// This message indicates the monitored frame loading had completed.
629IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted)
630
[email protected]6a3eede2011-08-29 23:48:05631// The following messages are used to set and get cookies for ChromeFrame
632// processes.
633// Used to set a cookie. The cookie is set asynchronously, but will be
634// available to a subsequent ChromeViewHostMsg_GetCookies request.
635IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie,
636 GURL /* url */,
637 GURL /* first_party_for_cookies */,
638 std::string /* cookie */)
639
640// Used to get cookies for the given URL. This may block waiting for a
641// previous SetCookie message to be processed.
642IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
643 GURL /* url */,
644 GURL /* first_party_for_cookies */,
645 std::string /* cookies */)
[email protected]a1127f82011-09-08 17:27:01646
647// Provide the browser process with current renderer framerate.
648IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
649 int /* routing id */,
650 float /* frames per second */)
[email protected]38fe2892013-07-11 00:21:04651
652// Counts a mouseover event on an InstantExtended most visited tile.
653IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CountMouseover,
654 int /* page_id */)
655
656// Tells InstantExtended to set the omnibox focus state.
657IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox,
658 int /* page_id */,
659 OmniboxFocusState /* state */)
660
661// Tells InstantExtended whether the embedded search API is supported.
662// See http://dev.chromium.org/embeddedsearch
663IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
664 int /* page_id */,
665 bool /* result */)
666
667// Tells InstantExtended to delete a most visited item.
668IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem,
669 int /* page_id */,
670 GURL /* url */)
671
672// Tells InstantExtended to navigate the active tab to a possibly priveleged
673// URL.
674IPC_MESSAGE_ROUTED5(ChromeViewHostMsg_SearchBoxNavigate,
675 int /* page_id */,
676 GURL /* destination */,
677 content::PageTransition /* transition */,
678 WindowOpenDisposition /* disposition */,
679 bool /* is_search_type */)
680
681// Tells InstantExtended to undo all most visited item deletions.
682IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions,
683 int /* page_id */)
684
685// Tells InstantExtended to undo one most visited item deletion.
686IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion,
687 int /* page_id */,
688 GURL /* url */)
689
690// Tells InstantExtended whether the page supports voice search.
691IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported,
692 int /* page_id */,
693 bool /* supported */)