blob: db4cbcaab1c1261d5b8d93856bb8dbb24394dbb5 [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]d5a04832011-03-12 21:46:2612#include "base/file_path.h"
[email protected]d5a04832011-03-12 21:46:2613#include "base/process.h"
[email protected]d5a04832011-03-12 21:46:2614#include "base/shared_memory.h"
[email protected]4c79e3e2009-10-23 18:31:3215#include "base/string16.h"
[email protected]6782f832011-05-10 04:06:0016#include "base/stringprintf.h"
[email protected]d5a04832011-03-12 21:46:2617#include "base/values.h"
18#include "build/build_config.h"
[email protected]79d68c62011-04-15 21:07:0319#include "chrome/common/common_param_traits.h"
[email protected]c14406092011-10-27 13:43:4220#include "chrome/common/content_settings.h"
[email protected]610ca832011-10-19 12:59:2021#include "chrome/common/content_settings_pattern.h"
[email protected]1c9c7fb2011-03-11 16:38:3822#include "chrome/common/instant_types.h"
[email protected]d5a04832011-03-12 21:46:2623#include "chrome/common/nacl_types.h"
[email protected]c08e7932011-03-29 04:08:1424#include "chrome/common/search_provider.h"
[email protected]152b8ba32010-03-29 19:40:1625#include "chrome/common/translate_errors.h"
[email protected]19a5c7442011-10-21 20:00:4126#include "content/public/common/common_param_traits.h"
[email protected]17b5a8172012-06-22 21:09:0927#include "ipc/ipc_channel_handle.h"
[email protected]d5a04832011-03-12 21:46:2628#include "ipc/ipc_message_macros.h"
[email protected]e7f009d2011-06-14 19:35:1029#include "ipc/ipc_platform_file.h"
[email protected]1d4ecf42011-08-26 21:27:3030#include "third_party/skia/include/core/SkBitmap.h"
[email protected]fffaf972011-03-24 01:34:3531#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
[email protected]fffaf972011-03-24 01:34:3532#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
[email protected]d5a04832011-03-12 21:46:2633#include "ui/gfx/rect.h"
[email protected]7a4de7a62010-08-17 18:38:2434
[email protected]44c49c92011-03-28 16:17:2335// Singly-included section for enums and custom IPC traits.
[email protected]d5a04832011-03-12 21:46:2636#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
37#define CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]049eec22010-10-20 21:32:5238
[email protected]992db4c2011-05-12 15:37:1539class SkBitmap;
40
[email protected]a6097f42011-01-10 08:50:5141// Command values for the cmd parameter of the
42// ViewHost_JavaScriptStressTestControl message. For each command the parameter
43// passed has a different meaning:
44// For the command kJavaScriptStressTestSetStressRunType the parameter it the
45// type taken from the enumeration v8::Testing::StressType.
46// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
47// number of the stress run about to take place.
48enum ViewHostMsg_JavaScriptStressTestControl_Commands {
49 kJavaScriptStressTestSetStressRunType = 0,
50 kJavaScriptStressTestPrepareStressRun = 1,
51};
52
[email protected]51b63f62011-10-05 18:55:4253// This enum is inside a struct so that we can forward-declare the struct in
54// others headers without having to include this one.
55struct ChromeViewHostMsg_GetPluginInfo_Status {
[email protected]51b63f62011-10-05 18:55:4256 enum Value {
57 kAllowed,
[email protected]8aa7a412011-11-07 12:33:4258 kBlocked,
59 kClickToPlay,
[email protected]51b63f62011-10-05 18:55:4260 kDisabled,
61 kNotFound,
[email protected]a1199132012-10-26 22:14:4162 kNPAPINotSupported,
[email protected]8aa7a412011-11-07 12:33:4263 kOutdatedBlocked,
64 kOutdatedDisallowed,
65 kUnauthorized,
[email protected]51b63f62011-10-05 18:55:4266 };
67
68 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {}
69
70 Value value;
71};
72
[email protected]7d5c3ac2009-02-04 08:58:1973namespace IPC {
74
[email protected]9c7453d2012-01-21 00:45:4075#if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
[email protected]661eb9d2009-02-03 02:11:4876
77// TODO(port): this shouldn't exist. However, the plugin stuff is really using
78// HWNDS (NativeView), and making Windows calls based on them. I've not figured
79// out the deal with plugins yet.
[email protected]9c7453d2012-01-21 00:45:4080// TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow.
[email protected]661eb9d2009-02-03 02:11:4881template <>
82struct ParamTraits<gfx::NativeView> {
83 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1984 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4885 NOTIMPLEMENTED();
86 }
87
[email protected]ce208f872012-03-07 20:42:5688 static bool Read(const Message* m, PickleIterator* iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4889 NOTIMPLEMENTED();
90 *p = NULL;
91 return true;
92 }
93
[email protected]252cad62010-08-18 18:33:5794 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:4895 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:4896 }
97};
98
[email protected]9c7453d2012-01-21 00:45:4099#endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
[email protected]661eb9d2009-02-03 02:11:48100
[email protected]7b291f92009-08-14 05:43:53101template <>
[email protected]610ca832011-10-19 12:59:20102struct ParamTraits<ContentSettingsPattern> {
103 typedef ContentSettingsPattern param_type;
104 static void Write(Message* m, const param_type& p);
[email protected]ce208f872012-03-07 20:42:56105 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
[email protected]610ca832011-10-19 12:59:20106 static void Log(const param_type& p, std::string* l);
107};
108
[email protected]b3df5a42010-05-11 14:31:09109} // namespace IPC
[email protected]9f4db512010-05-10 20:21:41110
[email protected]5a52f162008-08-27 04:15:31111#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:26112
[email protected]778574e2011-03-21 22:03:50113#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:26114
[email protected]51b63f62011-10-05 18:55:42115IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value)
[email protected]fffaf972011-03-24 01:34:35116IPC_ENUM_TRAITS(InstantCompleteBehavior)
[email protected]0e7cb682012-08-15 04:04:38117IPC_ENUM_TRAITS(InstantSizeUnits)
118IPC_ENUM_TRAITS(InstantSuggestionType)
[email protected]c2c82962012-10-20 00:02:24119IPC_ENUM_TRAITS(InstantShownReason)
[email protected]c08e7932011-03-29 04:08:14120IPC_ENUM_TRAITS(search_provider::OSDDType)
121IPC_ENUM_TRAITS(search_provider::InstallState)
[email protected]a6827652012-11-20 23:41:08122IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment)
123IPC_ENUM_TRAITS(ThemeBackgroundImageTiling)
[email protected]fffaf972011-03-24 01:34:35124IPC_ENUM_TRAITS(TranslateErrors::Type)
[email protected]fffaf972011-03-24 01:34:35125IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]fffaf972011-03-24 01:34:35126
[email protected]51b63f62011-10-05 18:55:42127IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status)
128IPC_STRUCT_TRAITS_MEMBER(value)
129IPC_STRUCT_TRAITS_END()
130
[email protected]cd33d282012-09-21 12:53:04131// Output parameters for ChromeViewHostMsg_GetPluginInfo message.
132IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output)
133 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status)
134 IPC_STRUCT_MEMBER(webkit::WebPluginInfo, plugin)
135 IPC_STRUCT_MEMBER(std::string, actual_mime_type)
136 IPC_STRUCT_MEMBER(std::string, group_identifier)
137 IPC_STRUCT_MEMBER(string16, group_name)
138IPC_STRUCT_END()
139
[email protected]610ca832011-10-19 12:59:20140IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts)
141 IPC_STRUCT_TRAITS_MEMBER(scheme)
142 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard)
143 IPC_STRUCT_TRAITS_MEMBER(host)
144 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard)
145 IPC_STRUCT_TRAITS_MEMBER(port)
146 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard)
147 IPC_STRUCT_TRAITS_MEMBER(path)
[email protected]ae689aab2012-01-23 17:52:08148 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard)
[email protected]610ca832011-10-19 12:59:20149IPC_STRUCT_TRAITS_END()
150
[email protected]c14406092011-10-27 13:43:42151IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
152 IPC_STRUCT_TRAITS_MEMBER(primary_pattern)
153 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern)
154 IPC_STRUCT_TRAITS_MEMBER(setting)
155 IPC_STRUCT_TRAITS_MEMBER(source)
156 IPC_STRUCT_TRAITS_MEMBER(incognito)
157IPC_STRUCT_TRAITS_END()
158
[email protected]0e7cb682012-08-15 04:04:38159IPC_STRUCT_TRAITS_BEGIN(InstantAutocompleteResult)
160 IPC_STRUCT_TRAITS_MEMBER(provider)
[email protected]6dcd25762012-11-14 05:31:51161 IPC_STRUCT_TRAITS_MEMBER(type)
162 IPC_STRUCT_TRAITS_MEMBER(description)
[email protected]0e7cb682012-08-15 04:04:38163 IPC_STRUCT_TRAITS_MEMBER(destination_url)
164 IPC_STRUCT_TRAITS_MEMBER(relevance)
165IPC_STRUCT_TRAITS_END()
166
167IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion)
168 IPC_STRUCT_TRAITS_MEMBER(text)
169 IPC_STRUCT_TRAITS_MEMBER(behavior)
170 IPC_STRUCT_TRAITS_MEMBER(type)
171IPC_STRUCT_TRAITS_END()
172
[email protected]edece212011-11-16 11:56:56173IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
174 IPC_STRUCT_TRAITS_MEMBER(image_rules)
175 IPC_STRUCT_TRAITS_MEMBER(script_rules)
176IPC_STRUCT_TRAITS_END()
177
[email protected]a6827652012-11-20 23:41:08178IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo)
179 IPC_STRUCT_TRAITS_MEMBER(color_r)
180 IPC_STRUCT_TRAITS_MEMBER(color_g)
181 IPC_STRUCT_TRAITS_MEMBER(color_b)
182 IPC_STRUCT_TRAITS_MEMBER(color_a)
183 IPC_STRUCT_TRAITS_MEMBER(theme_id)
184 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment)
185 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment)
186 IPC_STRUCT_TRAITS_MEMBER(image_tiling)
187 IPC_STRUCT_TRAITS_MEMBER(image_height)
188IPC_STRUCT_TRAITS_END()
189
[email protected]fffaf972011-03-24 01:34:35190IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
191 IPC_STRUCT_TRAITS_MEMBER(count)
192 IPC_STRUCT_TRAITS_MEMBER(size)
193 IPC_STRUCT_TRAITS_MEMBER(liveSize)
194 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
195IPC_STRUCT_TRAITS_END()
196
197IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
198 IPC_STRUCT_TRAITS_MEMBER(images)
199 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
200 IPC_STRUCT_TRAITS_MEMBER(scripts)
201 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
202 IPC_STRUCT_TRAITS_MEMBER(fonts)
203IPC_STRUCT_TRAITS_END()
204
205IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
206 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
207 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
208 IPC_STRUCT_TRAITS_MEMBER(capacity)
209 IPC_STRUCT_TRAITS_MEMBER(liveSize)
210 IPC_STRUCT_TRAITS_MEMBER(deadSize)
211IPC_STRUCT_TRAITS_END()
212
[email protected]d5a04832011-03-12 21:46:26213//-----------------------------------------------------------------------------
214// RenderView messages
215// These are messages sent from the browser to the renderer process.
216
[email protected]d5a04832011-03-12 21:46:26217// Tells the renderer to set its maximum cache size to the supplied value.
[email protected]2ccf45c2011-08-19 23:35:50218IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities,
[email protected]d5a04832011-03-12 21:46:26219 size_t /* min_dead_capacity */,
220 size_t /* max_dead_capacity */,
221 size_t /* capacity */)
222
223// Tells the renderer to clear the cache.
[email protected]e81d4d72011-09-29 16:54:31224IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache,
225 bool /* on_navigation */)
[email protected]d5a04832011-03-12 21:46:26226
[email protected]55722152011-03-22 01:33:53227// Tells the renderer to dump as much memory as it can, perhaps because we
228// have memory pressure or the renderer is (or will be) paged out. This
229// should only result in purging objects we can recalculate, e.g. caches or
230// JS garbage, not in purging irreplaceable objects.
[email protected]2ccf45c2011-08-19 23:35:50231IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory)
[email protected]55722152011-03-22 01:33:53232
[email protected]350019f2011-08-02 04:18:33233// For WebUI testing, this message stores parameters to do ScriptEvalRequest at
234// a time which is late enough to not be thrown out, and early enough to be
235// before onload events are fired.
[email protected]2ccf45c2011-08-19 23:35:50236IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript,
[email protected]350019f2011-08-02 04:18:33237 string16, /* frame_xpath */
238 string16, /* jscript_url */
239 int, /* ID */
240 bool /* If true, result is sent back. */)
241
[email protected]55722152011-03-22 01:33:53242// Tells the render view to capture a thumbnail image of the page. The
[email protected]2ccf45c2011-08-19 23:35:50243// render view responds with a ChromeViewHostMsg_Snapshot.
244IPC_MESSAGE_ROUTED0(ChromeViewMsg_CaptureSnapshot)
[email protected]d5a04832011-03-12 21:46:26245
[email protected]d5a04832011-03-12 21:46:26246// History system notification that the visited link database has been
247// replaced. It has one SharedMemoryHandle argument consisting of the table
248// handle. This handle is valid in the context of the renderer
[email protected]2ccf45c2011-08-19 23:35:50249IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_NewTable,
250 base::SharedMemoryHandle)
[email protected]d5a04832011-03-12 21:46:26251
252// History system notification that a link has been added and the link
253// coloring state for the given hash must be re-calculated.
[email protected]2ccf45c2011-08-19 23:35:50254IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_Add, std::vector<uint64>)
[email protected]d5a04832011-03-12 21:46:26255
256// History system notification that one or more history items have been
257// deleted, which at this point means that all link coloring state must be
258// re-calculated.
[email protected]2ccf45c2011-08-19 23:35:50259IPC_MESSAGE_CONTROL0(ChromeViewMsg_VisitedLink_Reset)
[email protected]d5a04832011-03-12 21:46:26260
[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]2ccf45c2011-08-19 23:35:50288IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange,
[email protected]d5a04832011-03-12 21:46:26289 string16 /* value */,
290 bool /* verbatim */,
[email protected]c55e3b82012-08-09 15:27:05291 size_t /* selection_start */,
292 size_t /* selection_end */)
[email protected]0e7cb682012-08-15 04:04:38293
[email protected]c55e3b82012-08-09 15:27:05294IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit,
295 string16 /* value */)
[email protected]0e7cb682012-08-15 04:04:38296
[email protected]c55e3b82012-08-09 15:27:05297IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel,
298 string16 /* value */)
[email protected]0e7cb682012-08-15 04:04:38299
[email protected]2ccf45c2011-08-19 23:35:50300IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxResize,
[email protected]d5a04832011-03-12 21:46:26301 gfx::Rect /* search_box_bounds */)
[email protected]0e7cb682012-08-15 04:04:38302
[email protected]c55e3b82012-08-09 15:27:05303IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant)
[email protected]d5a04832011-03-12 21:46:26304
[email protected]0e7cb682012-08-15 04:04:38305IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxAutocompleteResults,
306 std::vector<InstantAutocompleteResult>
307 /* native_suggestions */)
308
[email protected]056793e2012-09-19 00:40:28309IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxUpOrDownKeyPressed,
310 int /* count */)
[email protected]0e7cb682012-08-15 04:04:38311
[email protected]0b10c9ff2012-10-09 17:31:55312IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxActiveTabModeChanged,
313 bool /* active_tab_is_ntp */)
314
[email protected]a6827652012-11-20 23:41:08315IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged,
316 ThemeBackgroundInfo /* value */)
317
318IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeAreaHeightChanged,
319 int /* height */)
320
[email protected]1138cce2011-12-02 21:29:36321// Toggles visual muting of the render view area. This is on when a constrained
322// window is showing.
323IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
324 bool /* deemphazied */)
325
[email protected]d5a04832011-03-12 21:46:26326// Tells the renderer to translate the page contents from one language to
327// another.
[email protected]2ccf45c2011-08-19 23:35:50328IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage,
[email protected]d5a04832011-03-12 21:46:26329 int /* page id */,
330 std::string, /* the script injected in the page */
331 std::string, /* BCP 47/RFC 5646 language code the page
332 is in */
333 std::string /* BCP 47/RFC 5646 language code to translate
334 to */)
335
336// Tells the renderer to revert the text of translated page to its original
337// contents.
[email protected]2ccf45c2011-08-19 23:35:50338IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation,
[email protected]d5a04832011-03-12 21:46:26339 int /* page id */)
340
[email protected]d5a04832011-03-12 21:46:26341// Sent on process startup to indicate whether this process is running in
342// incognito mode.
[email protected]2ccf45c2011-08-19 23:35:50343IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
[email protected]d5a04832011-03-12 21:46:26344 bool /* is_incognito_processs */)
345
[email protected]68cafdb2011-06-10 21:42:18346// Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50347IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18348 bool /* allowed */)
349
350// Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50351IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18352 bool /* allowed */)
353
[email protected]92d213842011-11-02 20:09:43354// Tells renderer to always enforce mixed content blocking for this host.
355IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost,
356 std::string /* host */)
357
[email protected]8c40da62011-07-13 22:58:46358// Sent when the profile changes the kSafeBrowsingEnabled preference.
[email protected]2ccf45c2011-08-19 23:35:50359IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
[email protected]8c40da62011-07-13 22:58:46360 bool /* enable_phishing_detection */)
361
[email protected]83af80b22011-09-06 18:49:19362// This message asks frame sniffer start.
363IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer,
364 string16 /* frame-name */)
365
[email protected]21d898342011-08-23 18:14:41366// JavaScript related messages -----------------------------------------------
367
368// Notify the JavaScript engine in the render to change its parameters
369// while performing stress testing.
370IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
371 int /* cmd */,
372 int /* param */)
373
[email protected]a1127f82011-09-08 17:27:01374// Asks the renderer to send back FPS.
375IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS)
376
[email protected]6f9f7d82011-12-08 12:13:34377// Tells the view it is displaying an interstitial page.
378IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial)
379
[email protected]a1a7ff32012-07-19 14:03:51380// Tells the renderer to suspend/resume the webkit timers.
381IPC_MESSAGE_CONTROL1(ChromeViewMsg_ToggleWebKitSharedTimer,
382 bool /* suspend */)
383
[email protected]d5a04832011-03-12 21:46:26384//-----------------------------------------------------------------------------
[email protected]63f72132012-04-18 18:02:44385// Misc messages
[email protected]d5a04832011-03-12 21:46:26386// These are messages sent from the renderer to the browser process.
387
[email protected]93b9d692011-04-13 00:44:31388// Provides the contents for the given page that was loaded recently.
[email protected]2ccf45c2011-08-19 23:35:50389IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageContents,
[email protected]93b9d692011-04-13 00:44:31390 GURL /* URL of the page */,
391 int32 /* page id */,
392 string16 /* page contents */)
393
394// Notification that the language for the tab has been determined.
[email protected]2ccf45c2011-08-19 23:35:50395IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined,
[email protected]93b9d692011-04-13 00:44:31396 std::string /* page ISO639_1 language code */,
397 bool /* whether the page can be translated */)
398
[email protected]2ccf45c2011-08-19 23:35:50399IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats,
[email protected]d5a04832011-03-12 21:46:26400 WebKit::WebCache::UsageStats /* stats */)
401
[email protected]d5a04832011-03-12 21:46:26402// Tells the browser that content in the current page was blocked due to the
403// user's content settings.
[email protected]2ccf45c2011-08-19 23:35:50404IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked,
[email protected]d5a04832011-03-12 21:46:26405 ContentSettingsType, /* type of blocked content */
406 std::string /* resource identifier */)
407
[email protected]5327dfb2011-05-03 17:50:36408// Sent by the renderer process to check whether access to web databases is
[email protected]bac33eb2011-05-04 01:47:49409// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50410IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase,
[email protected]9a611a92011-05-07 17:06:18411 int /* render_view_id */,
412 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15413 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49414 string16 /* database name */,
415 string16 /* database display name */,
[email protected]8c276642011-05-06 09:41:00416 bool /* allowed */)
[email protected]bac33eb2011-05-04 01:47:49417
418// Sent by the renderer process to check whether access to DOM Storage is
419// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50420IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage,
[email protected]bac33eb2011-05-04 01:47:49421 int /* render_view_id */,
422 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15423 GURL /* top origin url */,
[email protected]c729db82011-11-23 17:37:27424 bool /* if true local storage, otherwise session */,
[email protected]8c276642011-05-06 09:41:00425 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36426
[email protected]45316d62011-05-12 18:15:30427// Sent by the renderer process to check whether access to FileSystem is
428// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50429IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem,
[email protected]45316d62011-05-12 18:15:30430 int /* render_view_id */,
431 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15432 GURL /* top origin url */,
[email protected]45316d62011-05-12 18:15:30433 bool /* allowed */)
434
[email protected]9a611a92011-05-07 17:06:18435// Sent by the renderer process to check whether access to Indexed DBis
436// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50437IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB,
[email protected]9a611a92011-05-07 17:06:18438 int /* render_view_id */,
[email protected]c0a45a982011-05-25 16:58:15439 GURL /* origin_url */,
440 GURL /* top origin url */,
[email protected]9a611a92011-05-07 17:06:18441 string16 /* database name */,
442 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36443
[email protected]51b63f62011-10-05 18:55:42444// Return information about a plugin for the given URL and MIME type.
445// In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
446// about specific reasons why a plug-in can't be used, for example because it's
447// disabled.
[email protected]cd33d282012-09-21 12:53:04448IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo,
[email protected]51b63f62011-10-05 18:55:42449 int /* render_view_id */,
450 GURL /* url */,
451 GURL /* top origin url */,
452 std::string /* mime_type */,
[email protected]cd33d282012-09-21 12:53:04453 ChromeViewHostMsg_GetPluginInfo_Output /* output */)
[email protected]51b63f62011-10-05 18:55:42454
[email protected]43b7eaca2012-01-12 17:27:28455#if defined(ENABLE_PLUGIN_INSTALLATION)
[email protected]1d697f32011-11-28 11:57:51456// Tells the browser to search for a plug-in that can handle the given MIME
457// type. The result will be sent asynchronously to the routing ID
458// |placeholder_id|.
459IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin,
460 int /* placeholder_id */,
461 std::string /* mime_type */)
462
[email protected]3240d2502012-01-26 17:00:33463// Notifies the browser that a missing plug-in placeholder has been removed, so
[email protected]e2424012012-02-03 10:26:50464// the corresponding PluginPlaceholderHost can be deleted.
465IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost,
[email protected]3240d2502012-01-26 17:00:33466 int /* placeholder_id */)
467
[email protected]1d697f32011-11-28 11:57:51468// Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
469// has been found.
470IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin,
471 string16 /* plugin_name */)
472
473// Notifies a missing plug-in placeholder that no plug-in has been found.
474IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin)
475
[email protected]0dd9e8b2012-01-04 13:36:16476// Notifies a missing plug-in placeholder that we have started downloading
477// the plug-in.
478IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin)
479
480// Notifies a missing plug-in placeholder that we have finished downloading
481// the plug-in.
482IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin)
483
[email protected]725f6882012-01-13 18:50:06484// Notifies a missing plug-in placeholder that there was an error downloading
485// the plug-in.
486IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin,
487 std::string /* message */)
[email protected]4f62d8052012-01-18 16:16:59488#endif // defined(ENABLE_PLUGIN_INSTALLATION)
489
[email protected]1a86f752012-02-10 13:20:36490// Notifies a missing plug-in placeholder that the user cancelled downloading
491// the plug-in.
492IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin)
493
[email protected]4f62d8052012-01-18 16:16:59494// Tells the browser to open chrome://plugins in a new tab. We use a separate
495// message because renderer processes aren't allowed to directly navigate to
496// chrome:// URLs.
497IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins)
[email protected]725f6882012-01-13 18:50:06498
[email protected]cc5f7812012-05-31 13:50:34499// Tells the browser that there was an error loading a plug-in.
500IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin,
501 FilePath /* plugin_path */)
502
[email protected]a1199132012-10-26 22:14:41503// Tells the browser that we blocked a plug-in because NPAPI is not supported.
504IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported,
505 std::string /* identifer */)
506
[email protected]d5a04832011-03-12 21:46:26507// Send a snapshot of the tab contents to the render host.
[email protected]2ccf45c2011-08-19 23:35:50508IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot,
[email protected]d5a04832011-03-12 21:46:26509 SkBitmap /* bitmap */)
510
[email protected]d5a04832011-03-12 21:46:26511// A message for an external host.
[email protected]2ccf45c2011-08-19 23:35:50512IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost,
[email protected]d5a04832011-03-12 21:46:26513 std::string /* message */,
514 std::string /* origin */,
515 std::string /* target */)
516
[email protected]d5a04832011-03-12 21:46:26517// A renderer sends this to the browser process when it wants to start
518// a new instance of the Native Client process. The browser will launch
[email protected]17b5a8172012-06-22 21:09:09519// the process and return an IPC channel handle. This handle will only
520// be valid if the NaCl IPC proxy is enabled.
[email protected]e02ff722012-11-06 03:53:06521IPC_SYNC_MESSAGE_CONTROL4_3(ChromeViewHostMsg_LaunchNaCl,
[email protected]87f35592012-04-08 00:49:16522 GURL /* manifest_url */,
[email protected]e02ff722012-11-06 03:53:06523 int /* render_view_id */,
[email protected]9da4fed2012-11-01 17:07:55524 uint32 /* permission_bits */,
[email protected]d5a04832011-03-12 21:46:26525 int /* socket count */,
526 std::vector<nacl::FileDescriptor>
[email protected]17b5a8172012-06-22 21:09:09527 /* imc channel handles */,
[email protected]2b7197b2012-10-23 21:54:42528 IPC::ChannelHandle /* ipc_channel_handle */,
529 int /* plugin_child_id */)
[email protected]d5a04832011-03-12 21:46:26530
[email protected]9a807152012-07-30 17:13:01531// A renderer sends this to the browser process when it wants to
[email protected]1787bb42012-07-23 22:26:50532// open a file for from the Pnacl component directory.
533IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetReadonlyPnaclFD,
534 std::string /* name of requested PNaCl file */,
535 IPC::PlatformFileForTransit /* output file */)
536
[email protected]9a807152012-07-30 17:13:01537// A renderer sends this to the browser process when it wants to
538// create a temporary file.
539IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_NaClCreateTemporaryFile,
540 IPC::PlatformFileForTransit /* out file */)
541
[email protected]d5a04832011-03-12 21:46:26542// Notification that the page has an OpenSearch description document
543// associated with it.
[email protected]2ccf45c2011-08-19 23:35:50544IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD,
[email protected]d5a04832011-03-12 21:46:26545 int32 /* page_id */,
546 GURL /* url of OS description document */,
[email protected]c08e7932011-03-29 04:08:14547 search_provider::OSDDType)
[email protected]d5a04832011-03-12 21:46:26548
549// Find out if the given url's security origin is installed as a search
550// provider.
[email protected]2ccf45c2011-08-19 23:35:50551IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState,
[email protected]c08e7932011-03-29 04:08:14552 GURL /* page url */,
553 GURL /* inquiry url */,
554 search_provider::InstallState /* install */)
[email protected]d5a04832011-03-12 21:46:26555
[email protected]d5a04832011-03-12 21:46:26556// Send back histograms as vector of pickled-histogram strings.
[email protected]2ccf45c2011-08-19 23:35:50557IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RendererHistograms,
[email protected]d5a04832011-03-12 21:46:26558 int, /* sequence number of Renderer Histograms. */
559 std::vector<std::string>)
560
[email protected]d5a04832011-03-12 21:46:26561// Sends back stats about the V8 heap.
[email protected]2ccf45c2011-08-19 23:35:50562IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats,
[email protected]d5a04832011-03-12 21:46:26563 int /* size of heap (allocated from the OS) */,
564 int /* bytes in use */)
565
566// Request for a DNS prefetch of the names in the array.
567// NameList is typedef'ed std::vector<std::string>
[email protected]2ccf45c2011-08-19 23:35:50568IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch,
[email protected]2bf2bd92011-03-31 07:12:44569 std::vector<std::string> /* hostnames */)
[email protected]d5a04832011-03-12 21:46:26570
[email protected]d5a04832011-03-12 21:46:26571// Notifies when a plugin couldn't be loaded because it's outdated.
[email protected]2ccf45c2011-08-19 23:35:50572IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin,
[email protected]27c483892012-02-09 15:59:10573 int /* placeholder ID */,
574 std::string /* plug-in group identifier */)
[email protected]d5a04832011-03-12 21:46:26575
[email protected]e2424012012-02-03 10:26:50576// Notifies when a plugin couldn't be loaded because it requires
577// user authorization.
[email protected]51ffaf72012-05-09 21:00:49578IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin,
579 string16 /* name */,
580 std::string /* plug-in group identifier */)
[email protected]e2424012012-02-03 10:26:50581
[email protected]d5a04832011-03-12 21:46:26582// Provide the browser process with information about the WebCore resource
[email protected]872ae5b2011-05-26 20:20:50583// cache and current renderer framerate.
[email protected]2ccf45c2011-08-19 23:35:50584IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats,
[email protected]d5a04832011-03-12 21:46:26585 WebKit::WebCache::ResourceTypeStats)
586
[email protected]d5a04832011-03-12 21:46:26587
588// Notifies the browser of the language (ISO 639_1 code language, such as fr,
589// en, zh...) of the current page.
[email protected]2ccf45c2011-08-19 23:35:50590IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PageLanguageDetermined,
[email protected]d5a04832011-03-12 21:46:26591 std::string /* the language */)
592
593// Notifies the browser that a page has been translated.
[email protected]2ccf45c2011-08-19 23:35:50594IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated,
[email protected]d5a04832011-03-12 21:46:26595 int, /* page id */
596 std::string /* the original language */,
597 std::string /* the translated language */,
598 TranslateErrors::Type /* the error type if available */)
599
[email protected]16e923d2011-04-30 00:41:44600// Message sent from the renderer to the browser to notify it of events which
601// may lead to the cancellation of a prerender. The message is sent only when
602// the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50603IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media)
[email protected]16e923d2011-04-30 00:41:44604
[email protected]4c94b8c2011-05-17 16:17:45605// Message sent from the renderer to the browser to notify it of a
606// window.print() call which should cancel the prerender. The message is sent
607// only when the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50608IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
[email protected]4c94b8c2011-05-17 16:17:45609
[email protected]ab2eb9f2011-05-03 23:02:37610// Sent by the renderer to check if a URL has permission to trigger a clipboard
611// read/write operation from the DOM.
[email protected]2ccf45c2011-08-19 23:35:50612IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
[email protected]34eec7ffe32011-11-02 23:49:02613 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37614 bool /* allowed */)
[email protected]2ccf45c2011-08-19 23:35:50615IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
[email protected]34eec7ffe32011-11-02 23:49:02616 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37617 bool /* allowed */)
618
[email protected]68cafdb2011-06-10 21:42:18619// Sent when the renderer was prevented from displaying insecure content in
620// a secure page by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50621IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18622
623// Sent when the renderer was prevented from running insecure content in
624// a secure origin by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50625IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18626
[email protected]2d0f2e92011-10-03 09:02:24627// Message sent from renderer to the browser when the element that is focused
628// and currently accepts keyboard input inside the webpage has been touched.
629IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FocusedEditableNodeTouched)
630
[email protected]d5a04832011-03-12 21:46:26631// Suggest results -----------------------------------------------------------
632
[email protected]c55e3b82012-08-09 15:27:05633// Sent by the Instant preview to populate the omnibox with query suggestions.
[email protected]0e7cb682012-08-15 04:04:38634IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetSuggestions,
[email protected]c55e3b82012-08-09 15:27:05635 int /* page_id */,
[email protected]0e7cb682012-08-15 04:04:38636 std::vector<InstantSuggestion> /* suggestions */)
[email protected]d5a04832011-03-12 21:46:26637
[email protected]c55e3b82012-08-09 15:27:05638// Sent by the Instant preview indicating whether the page supports the Instant
639// API or not (http://dev.chromium.org/searchbox).
[email protected]2ccf45c2011-08-19 23:35:50640IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
[email protected]c55e3b82012-08-09 15:27:05641 int /* page_id */,
642 bool /* result */)
[email protected]d5a04832011-03-12 21:46:26643
[email protected]c2c82962012-10-20 00:02:24644// Sent by the Instant preview asking to show itself with the given height.
645IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_ShowInstantPreview,
[email protected]0e7cb682012-08-15 04:04:38646 int /* page_id */,
[email protected]c2c82962012-10-20 00:02:24647 InstantShownReason /* reason */,
[email protected]0e7cb682012-08-15 04:04:38648 int /* height */,
649 InstantSizeUnits /* units */)
650
[email protected]21d898342011-08-23 18:14:41651// The currently displayed PDF has an unsupported feature.
652IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
[email protected]d5a04832011-03-12 21:46:26653
[email protected]83af80b22011-09-06 18:49:19654// This message indicates the error appeared in the frame.
655IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError,
656 int /* error */)
657
[email protected]ebce9522011-10-27 19:17:17658// This message indicates the monitored frame loading had completed.
659IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted)
660
[email protected]6a3eede2011-08-29 23:48:05661// The following messages are used to set and get cookies for ChromeFrame
662// processes.
663// Used to set a cookie. The cookie is set asynchronously, but will be
664// available to a subsequent ChromeViewHostMsg_GetCookies request.
665IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie,
666 GURL /* url */,
667 GURL /* first_party_for_cookies */,
668 std::string /* cookie */)
669
670// Used to get cookies for the given URL. This may block waiting for a
671// previous SetCookie message to be processed.
672IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
673 GURL /* url */,
674 GURL /* first_party_for_cookies */,
675 std::string /* cookies */)
[email protected]a1127f82011-09-08 17:27:01676
677// Provide the browser process with current renderer framerate.
678IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
679 int /* routing id */,
680 float /* frames per second */)