blob: cb077e5bc822c115d6e6a2da40c52d3ad197aa7a [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]d5a04832011-03-12 21:46:2625#include "chrome/common/thumbnail_score.h"
[email protected]152b8ba32010-03-29 19:40:1626#include "chrome/common/translate_errors.h"
[email protected]19a5c7442011-10-21 20:00:4127#include "content/public/common/common_param_traits.h"
28#include "content/public/common/webkit_param_traits.h"
[email protected]17b5a8172012-06-22 21:09:0929#include "ipc/ipc_channel_handle.h"
[email protected]d5a04832011-03-12 21:46:2630#include "ipc/ipc_message_macros.h"
[email protected]e7f009d2011-06-14 19:35:1031#include "ipc/ipc_platform_file.h"
[email protected]1d4ecf42011-08-26 21:27:3032#include "third_party/skia/include/core/SkBitmap.h"
[email protected]fffaf972011-03-24 01:34:3533#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
[email protected]fffaf972011-03-24 01:34:3534#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
[email protected]d5a04832011-03-12 21:46:2635#include "ui/gfx/rect.h"
[email protected]7a4de7a62010-08-17 18:38:2436
[email protected]44c49c92011-03-28 16:17:2337// Singly-included section for enums and custom IPC traits.
[email protected]d5a04832011-03-12 21:46:2638#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
39#define CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]049eec22010-10-20 21:32:5240
[email protected]992db4c2011-05-12 15:37:1541class SkBitmap;
42
[email protected]a6097f42011-01-10 08:50:5143// Command values for the cmd parameter of the
44// ViewHost_JavaScriptStressTestControl message. For each command the parameter
45// passed has a different meaning:
46// For the command kJavaScriptStressTestSetStressRunType the parameter it the
47// type taken from the enumeration v8::Testing::StressType.
48// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
49// number of the stress run about to take place.
50enum ViewHostMsg_JavaScriptStressTestControl_Commands {
51 kJavaScriptStressTestSetStressRunType = 0,
52 kJavaScriptStressTestPrepareStressRun = 1,
53};
54
[email protected]51b63f62011-10-05 18:55:4255// This enum is inside a struct so that we can forward-declare the struct in
56// others headers without having to include this one.
57struct ChromeViewHostMsg_GetPluginInfo_Status {
[email protected]51b63f62011-10-05 18:55:4258 enum Value {
59 kAllowed,
[email protected]8aa7a412011-11-07 12:33:4260 kBlocked,
61 kClickToPlay,
[email protected]51b63f62011-10-05 18:55:4262 kDisabled,
63 kNotFound,
[email protected]8aa7a412011-11-07 12:33:4264 kOutdatedBlocked,
65 kOutdatedDisallowed,
66 kUnauthorized,
[email protected]51b63f62011-10-05 18:55:4267 };
68
69 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {}
70
71 Value value;
72};
73
[email protected]7d5c3ac2009-02-04 08:58:1974namespace IPC {
75
[email protected]9c7453d2012-01-21 00:45:4076#if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
[email protected]661eb9d2009-02-03 02:11:4877
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]9c7453d2012-01-21 00:45:4081// TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow.
[email protected]661eb9d2009-02-03 02:11:4882template <>
83struct ParamTraits<gfx::NativeView> {
84 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1985 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4886 NOTIMPLEMENTED();
87 }
88
[email protected]ce208f872012-03-07 20:42:5689 static bool Read(const Message* m, PickleIterator* iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4890 NOTIMPLEMENTED();
91 *p = NULL;
92 return true;
93 }
94
[email protected]252cad62010-08-18 18:33:5795 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:4896 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:4897 }
98};
99
[email protected]9c7453d2012-01-21 00:45:40100#endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
[email protected]661eb9d2009-02-03 02:11:48101
[email protected]7b291f92009-08-14 05:43:53102template <>
[email protected]610ca832011-10-19 12:59:20103struct ParamTraits<ContentSettingsPattern> {
104 typedef ContentSettingsPattern param_type;
105 static void Write(Message* m, const param_type& p);
[email protected]ce208f872012-03-07 20:42:56106 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
[email protected]610ca832011-10-19 12:59:20107 static void Log(const param_type& p, std::string* l);
108};
109
[email protected]b3df5a42010-05-11 14:31:09110} // namespace IPC
[email protected]9f4db512010-05-10 20:21:41111
[email protected]5a52f162008-08-27 04:15:31112#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:26113
[email protected]778574e2011-03-21 22:03:50114#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:26115
[email protected]51b63f62011-10-05 18:55:42116IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value)
[email protected]fffaf972011-03-24 01:34:35117IPC_ENUM_TRAITS(InstantCompleteBehavior)
[email protected]0e7cb682012-08-15 04:04:38118IPC_ENUM_TRAITS(InstantSizeUnits)
119IPC_ENUM_TRAITS(InstantSuggestionType)
[email protected]c08e7932011-03-29 04:08:14120IPC_ENUM_TRAITS(search_provider::OSDDType)
121IPC_ENUM_TRAITS(search_provider::InstallState)
[email protected]fffaf972011-03-24 01:34:35122IPC_ENUM_TRAITS(TranslateErrors::Type)
[email protected]fffaf972011-03-24 01:34:35123IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]fffaf972011-03-24 01:34:35124
[email protected]51b63f62011-10-05 18:55:42125IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status)
126IPC_STRUCT_TRAITS_MEMBER(value)
127IPC_STRUCT_TRAITS_END()
128
[email protected]cd33d282012-09-21 12:53:04129// Output parameters for ChromeViewHostMsg_GetPluginInfo message.
130IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output)
131 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status)
132 IPC_STRUCT_MEMBER(webkit::WebPluginInfo, plugin)
133 IPC_STRUCT_MEMBER(std::string, actual_mime_type)
134 IPC_STRUCT_MEMBER(std::string, group_identifier)
135 IPC_STRUCT_MEMBER(string16, group_name)
136IPC_STRUCT_END()
137
[email protected]610ca832011-10-19 12:59:20138IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts)
139 IPC_STRUCT_TRAITS_MEMBER(scheme)
140 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard)
141 IPC_STRUCT_TRAITS_MEMBER(host)
142 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard)
143 IPC_STRUCT_TRAITS_MEMBER(port)
144 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard)
145 IPC_STRUCT_TRAITS_MEMBER(path)
[email protected]ae689aab2012-01-23 17:52:08146 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard)
[email protected]610ca832011-10-19 12:59:20147IPC_STRUCT_TRAITS_END()
148
[email protected]c14406092011-10-27 13:43:42149IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
150 IPC_STRUCT_TRAITS_MEMBER(primary_pattern)
151 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern)
152 IPC_STRUCT_TRAITS_MEMBER(setting)
153 IPC_STRUCT_TRAITS_MEMBER(source)
154 IPC_STRUCT_TRAITS_MEMBER(incognito)
155IPC_STRUCT_TRAITS_END()
156
[email protected]0e7cb682012-08-15 04:04:38157IPC_STRUCT_TRAITS_BEGIN(InstantAutocompleteResult)
158 IPC_STRUCT_TRAITS_MEMBER(provider)
159 IPC_STRUCT_TRAITS_MEMBER(is_search)
160 IPC_STRUCT_TRAITS_MEMBER(contents)
161 IPC_STRUCT_TRAITS_MEMBER(destination_url)
162 IPC_STRUCT_TRAITS_MEMBER(relevance)
163IPC_STRUCT_TRAITS_END()
164
165IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion)
166 IPC_STRUCT_TRAITS_MEMBER(text)
167 IPC_STRUCT_TRAITS_MEMBER(behavior)
168 IPC_STRUCT_TRAITS_MEMBER(type)
169IPC_STRUCT_TRAITS_END()
170
[email protected]edece212011-11-16 11:56:56171IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
172 IPC_STRUCT_TRAITS_MEMBER(image_rules)
173 IPC_STRUCT_TRAITS_MEMBER(script_rules)
174IPC_STRUCT_TRAITS_END()
175
[email protected]fffaf972011-03-24 01:34:35176IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
177 IPC_STRUCT_TRAITS_MEMBER(boring_score)
178 IPC_STRUCT_TRAITS_MEMBER(good_clipping)
179 IPC_STRUCT_TRAITS_MEMBER(at_top)
180 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot)
181IPC_STRUCT_TRAITS_END()
182
[email protected]fffaf972011-03-24 01:34:35183IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
184 IPC_STRUCT_TRAITS_MEMBER(count)
185 IPC_STRUCT_TRAITS_MEMBER(size)
186 IPC_STRUCT_TRAITS_MEMBER(liveSize)
187 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
188IPC_STRUCT_TRAITS_END()
189
190IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
191 IPC_STRUCT_TRAITS_MEMBER(images)
192 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
193 IPC_STRUCT_TRAITS_MEMBER(scripts)
194 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
195 IPC_STRUCT_TRAITS_MEMBER(fonts)
196IPC_STRUCT_TRAITS_END()
197
198IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
199 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
200 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
201 IPC_STRUCT_TRAITS_MEMBER(capacity)
202 IPC_STRUCT_TRAITS_MEMBER(liveSize)
203 IPC_STRUCT_TRAITS_MEMBER(deadSize)
204IPC_STRUCT_TRAITS_END()
205
[email protected]d5a04832011-03-12 21:46:26206//-----------------------------------------------------------------------------
207// RenderView messages
208// These are messages sent from the browser to the renderer process.
209
[email protected]d5a04832011-03-12 21:46:26210// Tells the renderer to set its maximum cache size to the supplied value.
[email protected]2ccf45c2011-08-19 23:35:50211IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities,
[email protected]d5a04832011-03-12 21:46:26212 size_t /* min_dead_capacity */,
213 size_t /* max_dead_capacity */,
214 size_t /* capacity */)
215
216// Tells the renderer to clear the cache.
[email protected]e81d4d72011-09-29 16:54:31217IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache,
218 bool /* on_navigation */)
[email protected]d5a04832011-03-12 21:46:26219
[email protected]55722152011-03-22 01:33:53220// Tells the renderer to dump as much memory as it can, perhaps because we
221// have memory pressure or the renderer is (or will be) paged out. This
222// should only result in purging objects we can recalculate, e.g. caches or
223// JS garbage, not in purging irreplaceable objects.
[email protected]2ccf45c2011-08-19 23:35:50224IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory)
[email protected]55722152011-03-22 01:33:53225
[email protected]350019f2011-08-02 04:18:33226// For WebUI testing, this message stores parameters to do ScriptEvalRequest at
227// a time which is late enough to not be thrown out, and early enough to be
228// before onload events are fired.
[email protected]2ccf45c2011-08-19 23:35:50229IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript,
[email protected]350019f2011-08-02 04:18:33230 string16, /* frame_xpath */
231 string16, /* jscript_url */
232 int, /* ID */
233 bool /* If true, result is sent back. */)
234
[email protected]55722152011-03-22 01:33:53235// Tells the render view to capture a thumbnail image of the page. The
[email protected]2ccf45c2011-08-19 23:35:50236// render view responds with a ChromeViewHostMsg_Snapshot.
237IPC_MESSAGE_ROUTED0(ChromeViewMsg_CaptureSnapshot)
[email protected]d5a04832011-03-12 21:46:26238
[email protected]d5a04832011-03-12 21:46:26239// History system notification that the visited link database has been
240// replaced. It has one SharedMemoryHandle argument consisting of the table
241// handle. This handle is valid in the context of the renderer
[email protected]2ccf45c2011-08-19 23:35:50242IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_NewTable,
243 base::SharedMemoryHandle)
[email protected]d5a04832011-03-12 21:46:26244
245// History system notification that a link has been added and the link
246// coloring state for the given hash must be re-calculated.
[email protected]2ccf45c2011-08-19 23:35:50247IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_Add, std::vector<uint64>)
[email protected]d5a04832011-03-12 21:46:26248
249// History system notification that one or more history items have been
250// deleted, which at this point means that all link coloring state must be
251// re-calculated.
[email protected]2ccf45c2011-08-19 23:35:50252IPC_MESSAGE_CONTROL0(ChromeViewMsg_VisitedLink_Reset)
[email protected]d5a04832011-03-12 21:46:26253
[email protected]edece212011-11-16 11:56:56254// Set the content setting rules stored by the renderer.
255IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
256 RendererContentSettingRules /* rules */)
[email protected]c14406092011-10-27 13:43:42257
[email protected]51ffaf72012-05-09 21:00:49258// Tells the render view to load all blocked plugins with the given identifier.
259IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins,
260 std::string /* identifier */)
[email protected]d5a04832011-03-12 21:46:26261
[email protected]d5a04832011-03-12 21:46:26262// Asks the renderer to send back stats on the WebCore cache broken down by
263// resource types.
[email protected]2ccf45c2011-08-19 23:35:50264IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats)
[email protected]d5a04832011-03-12 21:46:26265
[email protected]63a8ba12011-04-29 05:42:22266// Tells the renderer to create a FieldTrial, and by using a 100% probability
267// for the FieldTrial, forces the FieldTrial to have assigned group name.
[email protected]2ccf45c2011-08-19 23:35:50268IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup,
[email protected]63a8ba12011-04-29 05:42:22269 std::string /* field trial name */,
270 std::string /* group name that was assigned. */)
271
[email protected]d5a04832011-03-12 21:46:26272#if defined(USE_TCMALLOC)
[email protected]768e4ff2011-08-11 20:29:35273// Asks the renderer to enable/disable Tcmalloc heap profiling.
274// Note: filename_prefix arg is effectively ignored since the render process
275// will be unable to write files to disk. Instead use WriteTcmallocHeapProfile
276// to write a profile file.
[email protected]2ccf45c2011-08-19 23:35:50277IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetTcmallocHeapProfiling,
[email protected]768e4ff2011-08-11 20:29:35278 bool /* enable profiling */,
279 std::string /* filename prefix for profiles */)
280// Asks the renderer to write the Tcmalloc heap profile to a file.
[email protected]2ccf45c2011-08-19 23:35:50281IPC_MESSAGE_CONTROL1(ChromeViewMsg_WriteTcmallocHeapProfile,
[email protected]768e4ff2011-08-11 20:29:35282 FilePath::StringType /* filepath */)
[email protected]d5a04832011-03-12 21:46:26283#endif
284
285// Asks the renderer to send back V8 heap stats.
[email protected]2ccf45c2011-08-19 23:35:50286IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats)
[email protected]d5a04832011-03-12 21:46:26287
[email protected]d5a04832011-03-12 21:46:26288// Posts a message to the renderer.
[email protected]2ccf45c2011-08-19 23:35:50289IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost,
[email protected]d5a04832011-03-12 21:46:26290 std::string /* The message */,
291 std::string /* The origin */,
292 std::string /* The target*/)
293
[email protected]2ccf45c2011-08-19 23:35:50294IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange,
[email protected]d5a04832011-03-12 21:46:26295 string16 /* value */,
296 bool /* verbatim */,
[email protected]c55e3b82012-08-09 15:27:05297 size_t /* selection_start */,
298 size_t /* selection_end */)
[email protected]0e7cb682012-08-15 04:04:38299
[email protected]c55e3b82012-08-09 15:27:05300IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit,
301 string16 /* value */)
[email protected]0e7cb682012-08-15 04:04:38302
[email protected]c55e3b82012-08-09 15:27:05303IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel,
304 string16 /* value */)
[email protected]0e7cb682012-08-15 04:04:38305
[email protected]2ccf45c2011-08-19 23:35:50306IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxResize,
[email protected]d5a04832011-03-12 21:46:26307 gfx::Rect /* search_box_bounds */)
[email protected]0e7cb682012-08-15 04:04:38308
[email protected]c55e3b82012-08-09 15:27:05309IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant)
[email protected]d5a04832011-03-12 21:46:26310
[email protected]0e7cb682012-08-15 04:04:38311IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxAutocompleteResults,
312 std::vector<InstantAutocompleteResult>
313 /* native_suggestions */)
314
[email protected]056793e2012-09-19 00:40:28315IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxUpOrDownKeyPressed,
316 int /* count */)
[email protected]0e7cb682012-08-15 04:04:38317
[email protected]1138cce2011-12-02 21:29:36318// Toggles visual muting of the render view area. This is on when a constrained
319// window is showing.
320IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
321 bool /* deemphazied */)
322
[email protected]d5a04832011-03-12 21:46:26323// Tells the renderer to translate the page contents from one language to
324// another.
[email protected]2ccf45c2011-08-19 23:35:50325IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage,
[email protected]d5a04832011-03-12 21:46:26326 int /* page id */,
327 std::string, /* the script injected in the page */
328 std::string, /* BCP 47/RFC 5646 language code the page
329 is in */
330 std::string /* BCP 47/RFC 5646 language code to translate
331 to */)
332
333// Tells the renderer to revert the text of translated page to its original
334// contents.
[email protected]2ccf45c2011-08-19 23:35:50335IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation,
[email protected]d5a04832011-03-12 21:46:26336 int /* page id */)
337
[email protected]d5a04832011-03-12 21:46:26338// Sent on process startup to indicate whether this process is running in
339// incognito mode.
[email protected]2ccf45c2011-08-19 23:35:50340IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
[email protected]d5a04832011-03-12 21:46:26341 bool /* is_incognito_processs */)
342
[email protected]68cafdb2011-06-10 21:42:18343// Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50344IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18345 bool /* allowed */)
346
347// Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50348IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18349 bool /* allowed */)
350
[email protected]92d213842011-11-02 20:09:43351// Tells renderer to always enforce mixed content blocking for this host.
352IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost,
353 std::string /* host */)
354
[email protected]8c40da62011-07-13 22:58:46355// Sent when the profile changes the kSafeBrowsingEnabled preference.
[email protected]2ccf45c2011-08-19 23:35:50356IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
[email protected]8c40da62011-07-13 22:58:46357 bool /* enable_phishing_detection */)
358
[email protected]83af80b22011-09-06 18:49:19359// This message asks frame sniffer start.
360IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer,
361 string16 /* frame-name */)
362
[email protected]21d898342011-08-23 18:14:41363// JavaScript related messages -----------------------------------------------
364
365// Notify the JavaScript engine in the render to change its parameters
366// while performing stress testing.
367IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
368 int /* cmd */,
369 int /* param */)
370
[email protected]a1127f82011-09-08 17:27:01371// Asks the renderer to send back FPS.
372IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS)
373
[email protected]6f9f7d82011-12-08 12:13:34374// Tells the view it is displaying an interstitial page.
375IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial)
376
[email protected]a1a7ff32012-07-19 14:03:51377// Tells the renderer to suspend/resume the webkit timers.
378IPC_MESSAGE_CONTROL1(ChromeViewMsg_ToggleWebKitSharedTimer,
379 bool /* suspend */)
380
[email protected]d5a04832011-03-12 21:46:26381//-----------------------------------------------------------------------------
[email protected]63f72132012-04-18 18:02:44382// Misc messages
[email protected]d5a04832011-03-12 21:46:26383// These are messages sent from the renderer to the browser process.
384
[email protected]93b9d692011-04-13 00:44:31385// Provides the contents for the given page that was loaded recently.
[email protected]2ccf45c2011-08-19 23:35:50386IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageContents,
[email protected]93b9d692011-04-13 00:44:31387 GURL /* URL of the page */,
388 int32 /* page id */,
389 string16 /* page contents */)
390
391// Notification that the language for the tab has been determined.
[email protected]2ccf45c2011-08-19 23:35:50392IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined,
[email protected]93b9d692011-04-13 00:44:31393 std::string /* page ISO639_1 language code */,
394 bool /* whether the page can be translated */)
395
[email protected]2ccf45c2011-08-19 23:35:50396IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats,
[email protected]d5a04832011-03-12 21:46:26397 WebKit::WebCache::UsageStats /* stats */)
398
[email protected]d5a04832011-03-12 21:46:26399// Tells the browser that content in the current page was blocked due to the
400// user's content settings.
[email protected]2ccf45c2011-08-19 23:35:50401IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked,
[email protected]d5a04832011-03-12 21:46:26402 ContentSettingsType, /* type of blocked content */
403 std::string /* resource identifier */)
404
[email protected]5327dfb2011-05-03 17:50:36405// Sent by the renderer process to check whether access to web databases is
[email protected]bac33eb2011-05-04 01:47:49406// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50407IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase,
[email protected]9a611a92011-05-07 17:06:18408 int /* render_view_id */,
409 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15410 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49411 string16 /* database name */,
412 string16 /* database display name */,
[email protected]8c276642011-05-06 09:41:00413 bool /* allowed */)
[email protected]bac33eb2011-05-04 01:47:49414
415// Sent by the renderer process to check whether access to DOM Storage is
416// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50417IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage,
[email protected]bac33eb2011-05-04 01:47:49418 int /* render_view_id */,
419 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15420 GURL /* top origin url */,
[email protected]c729db82011-11-23 17:37:27421 bool /* if true local storage, otherwise session */,
[email protected]8c276642011-05-06 09:41:00422 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36423
[email protected]45316d62011-05-12 18:15:30424// Sent by the renderer process to check whether access to FileSystem is
425// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50426IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem,
[email protected]45316d62011-05-12 18:15:30427 int /* render_view_id */,
428 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15429 GURL /* top origin url */,
[email protected]45316d62011-05-12 18:15:30430 bool /* allowed */)
431
[email protected]9a611a92011-05-07 17:06:18432// Sent by the renderer process to check whether access to Indexed DBis
433// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50434IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB,
[email protected]9a611a92011-05-07 17:06:18435 int /* render_view_id */,
[email protected]c0a45a982011-05-25 16:58:15436 GURL /* origin_url */,
437 GURL /* top origin url */,
[email protected]9a611a92011-05-07 17:06:18438 string16 /* database name */,
439 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36440
[email protected]51b63f62011-10-05 18:55:42441// Return information about a plugin for the given URL and MIME type.
442// In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
443// about specific reasons why a plug-in can't be used, for example because it's
444// disabled.
[email protected]cd33d282012-09-21 12:53:04445IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo,
[email protected]51b63f62011-10-05 18:55:42446 int /* render_view_id */,
447 GURL /* url */,
448 GURL /* top origin url */,
449 std::string /* mime_type */,
[email protected]cd33d282012-09-21 12:53:04450 ChromeViewHostMsg_GetPluginInfo_Output /* output */)
[email protected]51b63f62011-10-05 18:55:42451
[email protected]43b7eaca2012-01-12 17:27:28452#if defined(ENABLE_PLUGIN_INSTALLATION)
[email protected]1d697f32011-11-28 11:57:51453// Tells the browser to search for a plug-in that can handle the given MIME
454// type. The result will be sent asynchronously to the routing ID
455// |placeholder_id|.
456IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin,
457 int /* placeholder_id */,
458 std::string /* mime_type */)
459
[email protected]3240d2502012-01-26 17:00:33460// Notifies the browser that a missing plug-in placeholder has been removed, so
[email protected]e2424012012-02-03 10:26:50461// the corresponding PluginPlaceholderHost can be deleted.
462IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost,
[email protected]3240d2502012-01-26 17:00:33463 int /* placeholder_id */)
464
[email protected]1d697f32011-11-28 11:57:51465// Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
466// has been found.
467IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin,
468 string16 /* plugin_name */)
469
470// Notifies a missing plug-in placeholder that no plug-in has been found.
471IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin)
472
[email protected]0dd9e8b2012-01-04 13:36:16473// Notifies a missing plug-in placeholder that we have started downloading
474// the plug-in.
475IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin)
476
477// Notifies a missing plug-in placeholder that we have finished downloading
478// the plug-in.
479IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin)
480
[email protected]725f6882012-01-13 18:50:06481// Notifies a missing plug-in placeholder that there was an error downloading
482// the plug-in.
483IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin,
484 std::string /* message */)
[email protected]4f62d8052012-01-18 16:16:59485#endif // defined(ENABLE_PLUGIN_INSTALLATION)
486
[email protected]1a86f752012-02-10 13:20:36487// Notifies a missing plug-in placeholder that the user cancelled downloading
488// the plug-in.
489IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin)
490
[email protected]4f62d8052012-01-18 16:16:59491// Tells the browser to open chrome://plugins in a new tab. We use a separate
492// message because renderer processes aren't allowed to directly navigate to
493// chrome:// URLs.
494IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins)
[email protected]725f6882012-01-13 18:50:06495
[email protected]cc5f7812012-05-31 13:50:34496// Tells the browser that there was an error loading a plug-in.
497IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin,
498 FilePath /* plugin_path */)
499
[email protected]d5a04832011-03-12 21:46:26500// Specifies the URL as the first parameter (a wstring) and thumbnail as
501// binary data as the second parameter.
[email protected]2ccf45c2011-08-19 23:35:50502IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_Thumbnail,
[email protected]d5a04832011-03-12 21:46:26503 GURL /* url */,
504 ThumbnailScore /* score */,
505 SkBitmap /* bitmap */)
506
507// 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.
521IPC_SYNC_MESSAGE_CONTROL2_2(ChromeViewHostMsg_LaunchNaCl,
[email protected]87f35592012-04-08 00:49:16522 GURL /* manifest_url */,
[email protected]d5a04832011-03-12 21:46:26523 int /* socket count */,
524 std::vector<nacl::FileDescriptor>
[email protected]17b5a8172012-06-22 21:09:09525 /* imc channel handles */,
526 IPC::ChannelHandle /* ipc_channel_handle */)
[email protected]d5a04832011-03-12 21:46:26527
[email protected]9a807152012-07-30 17:13:01528// A renderer sends this to the browser process when it wants to
[email protected]1787bb42012-07-23 22:26:50529// open a file for from the Pnacl component directory.
530IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetReadonlyPnaclFD,
531 std::string /* name of requested PNaCl file */,
532 IPC::PlatformFileForTransit /* output file */)
533
[email protected]9a807152012-07-30 17:13:01534// A renderer sends this to the browser process when it wants to
535// create a temporary file.
536IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_NaClCreateTemporaryFile,
537 IPC::PlatformFileForTransit /* out file */)
538
[email protected]d5a04832011-03-12 21:46:26539// Notification that the page has an OpenSearch description document
540// associated with it.
[email protected]2ccf45c2011-08-19 23:35:50541IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD,
[email protected]d5a04832011-03-12 21:46:26542 int32 /* page_id */,
543 GURL /* url of OS description document */,
[email protected]c08e7932011-03-29 04:08:14544 search_provider::OSDDType)
[email protected]d5a04832011-03-12 21:46:26545
546// Find out if the given url's security origin is installed as a search
547// provider.
[email protected]2ccf45c2011-08-19 23:35:50548IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState,
[email protected]c08e7932011-03-29 04:08:14549 GURL /* page url */,
550 GURL /* inquiry url */,
551 search_provider::InstallState /* install */)
[email protected]d5a04832011-03-12 21:46:26552
[email protected]d5a04832011-03-12 21:46:26553// Send back histograms as vector of pickled-histogram strings.
[email protected]2ccf45c2011-08-19 23:35:50554IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RendererHistograms,
[email protected]d5a04832011-03-12 21:46:26555 int, /* sequence number of Renderer Histograms. */
556 std::vector<std::string>)
557
558#if defined USE_TCMALLOC
[email protected]768e4ff2011-08-11 20:29:35559// Send back tcmalloc profile to write to a file.
[email protected]2ccf45c2011-08-19 23:35:50560IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK,
[email protected]768e4ff2011-08-11 20:29:35561 FilePath::StringType /* filepath */,
562 std::string /* heap profile */)
[email protected]d5a04832011-03-12 21:46:26563#endif
564
565// Sends back stats about the V8 heap.
[email protected]2ccf45c2011-08-19 23:35:50566IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats,
[email protected]d5a04832011-03-12 21:46:26567 int /* size of heap (allocated from the OS) */,
568 int /* bytes in use */)
569
570// Request for a DNS prefetch of the names in the array.
571// NameList is typedef'ed std::vector<std::string>
[email protected]2ccf45c2011-08-19 23:35:50572IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch,
[email protected]2bf2bd92011-03-31 07:12:44573 std::vector<std::string> /* hostnames */)
[email protected]d5a04832011-03-12 21:46:26574
[email protected]d5a04832011-03-12 21:46:26575// Notifies when a plugin couldn't be loaded because it's outdated.
[email protected]2ccf45c2011-08-19 23:35:50576IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin,
[email protected]27c483892012-02-09 15:59:10577 int /* placeholder ID */,
578 std::string /* plug-in group identifier */)
[email protected]d5a04832011-03-12 21:46:26579
[email protected]e2424012012-02-03 10:26:50580// Notifies when a plugin couldn't be loaded because it requires
581// user authorization.
[email protected]51ffaf72012-05-09 21:00:49582IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin,
583 string16 /* name */,
584 std::string /* plug-in group identifier */)
[email protected]e2424012012-02-03 10:26:50585
[email protected]d5a04832011-03-12 21:46:26586// Provide the browser process with information about the WebCore resource
[email protected]872ae5b2011-05-26 20:20:50587// cache and current renderer framerate.
[email protected]2ccf45c2011-08-19 23:35:50588IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats,
[email protected]d5a04832011-03-12 21:46:26589 WebKit::WebCache::ResourceTypeStats)
590
[email protected]d5a04832011-03-12 21:46:26591
592// Notifies the browser of the language (ISO 639_1 code language, such as fr,
593// en, zh...) of the current page.
[email protected]2ccf45c2011-08-19 23:35:50594IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PageLanguageDetermined,
[email protected]d5a04832011-03-12 21:46:26595 std::string /* the language */)
596
597// Notifies the browser that a page has been translated.
[email protected]2ccf45c2011-08-19 23:35:50598IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated,
[email protected]d5a04832011-03-12 21:46:26599 int, /* page id */
600 std::string /* the original language */,
601 std::string /* the translated language */,
602 TranslateErrors::Type /* the error type if available */)
603
[email protected]16e923d2011-04-30 00:41:44604// Message sent from the renderer to the browser to notify it of events which
605// may lead to the cancellation of a prerender. The message is sent only when
606// the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50607IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media)
[email protected]16e923d2011-04-30 00:41:44608
[email protected]4c94b8c2011-05-17 16:17:45609// Message sent from the renderer to the browser to notify it of a
610// window.print() call which should cancel the prerender. The message is sent
611// only when the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50612IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
[email protected]4c94b8c2011-05-17 16:17:45613
[email protected]ab2eb9f2011-05-03 23:02:37614// Sent by the renderer to check if a URL has permission to trigger a clipboard
615// read/write operation from the DOM.
[email protected]2ccf45c2011-08-19 23:35:50616IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
[email protected]34eec7ffe32011-11-02 23:49:02617 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37618 bool /* allowed */)
[email protected]2ccf45c2011-08-19 23:35:50619IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
[email protected]34eec7ffe32011-11-02 23:49:02620 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37621 bool /* allowed */)
622
[email protected]68cafdb2011-06-10 21:42:18623// Sent when the renderer was prevented from displaying insecure content in
624// a secure page by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50625IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18626
627// Sent when the renderer was prevented from running insecure content in
628// a secure origin by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50629IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18630
[email protected]2d0f2e92011-10-03 09:02:24631// Message sent from renderer to the browser when the element that is focused
632// and currently accepts keyboard input inside the webpage has been touched.
633IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FocusedEditableNodeTouched)
634
[email protected]d5a04832011-03-12 21:46:26635// Suggest results -----------------------------------------------------------
636
[email protected]c55e3b82012-08-09 15:27:05637// Sent by the Instant preview to populate the omnibox with query suggestions.
[email protected]0e7cb682012-08-15 04:04:38638IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetSuggestions,
[email protected]c55e3b82012-08-09 15:27:05639 int /* page_id */,
[email protected]0e7cb682012-08-15 04:04:38640 std::vector<InstantSuggestion> /* suggestions */)
[email protected]d5a04832011-03-12 21:46:26641
[email protected]c55e3b82012-08-09 15:27:05642// Sent by the Instant preview indicating whether the page supports the Instant
643// API or not (http://dev.chromium.org/searchbox).
[email protected]2ccf45c2011-08-19 23:35:50644IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
[email protected]c55e3b82012-08-09 15:27:05645 int /* page_id */,
646 bool /* result */)
[email protected]d5a04832011-03-12 21:46:26647
[email protected]0e7cb682012-08-15 04:04:38648// Sent by the Instant preview asking to resize itself to the given height.
649IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetInstantPreviewHeight,
650 int /* page_id */,
651 int /* height */,
652 InstantSizeUnits /* units */)
653
[email protected]21d898342011-08-23 18:14:41654// The currently displayed PDF has an unsupported feature.
655IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
[email protected]d5a04832011-03-12 21:46:26656
[email protected]83af80b22011-09-06 18:49:19657// This message indicates the error appeared in the frame.
658IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError,
659 int /* error */)
660
[email protected]ebce9522011-10-27 19:17:17661// This message indicates the monitored frame loading had completed.
662IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted)
663
[email protected]6a3eede2011-08-29 23:48:05664// The following messages are used to set and get cookies for ChromeFrame
665// processes.
666// Used to set a cookie. The cookie is set asynchronously, but will be
667// available to a subsequent ChromeViewHostMsg_GetCookies request.
668IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie,
669 GURL /* url */,
670 GURL /* first_party_for_cookies */,
671 std::string /* cookie */)
672
673// Used to get cookies for the given URL. This may block waiting for a
674// previous SetCookie message to be processed.
675IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
676 GURL /* url */,
677 GURL /* first_party_for_cookies */,
678 std::string /* cookies */)
[email protected]a1127f82011-09-08 17:27:01679
680// Provide the browser process with current renderer framerate.
681IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
682 int /* routing id */,
683 float /* frames per second */)