blob: 88b0f5d440986a8298cf3766896468fc55b9cc68 [file] [log] [blame]
[email protected]6c54e7e42011-03-02 20:52:341// Copyright (c) 2011 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
[email protected]7a4de7a62010-08-17 18:38:2411// TODO(erg): This list has been temporarily annotated by erg while doing work
12// on which headers to pull out.
initial.commit09911bf2008-07-26 23:55:2913#include "base/basictypes.h"
[email protected]d5a04832011-03-12 21:46:2614#include "base/file_path.h"
[email protected]d5a04832011-03-12 21:46:2615#include "base/process.h"
[email protected]d5a04832011-03-12 21:46:2616#include "base/shared_memory.h"
[email protected]4c79e3e2009-10-23 18:31:3217#include "base/string16.h"
[email protected]6782f832011-05-10 04:06:0018#include "base/stringprintf.h"
[email protected]d5a04832011-03-12 21:46:2619#include "base/values.h"
20#include "build/build_config.h"
[email protected]79d68c62011-04-15 21:07:0321#include "chrome/common/common_param_traits.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]db803aae2011-03-05 02:00:4227#include "content/common/common_param_traits.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]fffaf972011-03-24 01:34:3530#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
[email protected]fffaf972011-03-24 01:34:3531#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
[email protected]d5a04832011-03-12 21:46:2632#include "ui/gfx/rect.h"
[email protected]7a4de7a62010-08-17 18:38:2433
[email protected]44c49c92011-03-28 16:17:2334// Singly-included section for enums and custom IPC traits.
[email protected]d5a04832011-03-12 21:46:2635#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
36#define CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]049eec22010-10-20 21:32:5237
[email protected]992db4c2011-05-12 15:37:1538class SkBitmap;
39
[email protected]a6097f42011-01-10 08:50:5140// Command values for the cmd parameter of the
41// ViewHost_JavaScriptStressTestControl message. For each command the parameter
42// passed has a different meaning:
43// For the command kJavaScriptStressTestSetStressRunType the parameter it the
44// type taken from the enumeration v8::Testing::StressType.
45// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
46// number of the stress run about to take place.
47enum ViewHostMsg_JavaScriptStressTestControl_Commands {
48 kJavaScriptStressTestSetStressRunType = 0,
49 kJavaScriptStressTestPrepareStressRun = 1,
50};
51
[email protected]7d5c3ac2009-02-04 08:58:1952namespace IPC {
53
[email protected]661eb9d2009-02-03 02:11:4854#if defined(OS_POSIX)
55
56// TODO(port): this shouldn't exist. However, the plugin stuff is really using
57// HWNDS (NativeView), and making Windows calls based on them. I've not figured
58// out the deal with plugins yet.
59template <>
60struct ParamTraits<gfx::NativeView> {
61 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1962 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4863 NOTIMPLEMENTED();
64 }
65
[email protected]7d5c3ac2009-02-04 08:58:1966 static bool Read(const Message* m, void** iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4867 NOTIMPLEMENTED();
68 *p = NULL;
69 return true;
70 }
71
[email protected]252cad62010-08-18 18:33:5772 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:4873 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:4874 }
75};
76
77#endif // defined(OS_POSIX)
78
[email protected]7b291f92009-08-14 05:43:5379template <>
[email protected]fffaf972011-03-24 01:34:3580struct ParamTraits<ContentSettings> {
81 typedef ContentSettings param_type;
82 static void Write(Message* m, const param_type& p);
83 static bool Read(const Message* m, void** iter, param_type* r);
84 static void Log(const param_type& p, std::string* l);
[email protected]7b291f92009-08-14 05:43:5385};
[email protected]1b9af292009-07-09 04:30:3086
[email protected]b3df5a42010-05-11 14:31:0987} // namespace IPC
[email protected]9f4db512010-05-10 20:21:4188
[email protected]5a52f162008-08-27 04:15:3189#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:2690
[email protected]778574e2011-03-21 22:03:5091#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:2692
[email protected]fffaf972011-03-24 01:34:3593IPC_ENUM_TRAITS(InstantCompleteBehavior)
[email protected]c08e7932011-03-29 04:08:1494IPC_ENUM_TRAITS(search_provider::OSDDType)
95IPC_ENUM_TRAITS(search_provider::InstallState)
[email protected]fffaf972011-03-24 01:34:3596IPC_ENUM_TRAITS(TranslateErrors::Type)
[email protected]fffaf972011-03-24 01:34:3597IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]fffaf972011-03-24 01:34:3598
99IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
100 IPC_STRUCT_TRAITS_MEMBER(boring_score)
101 IPC_STRUCT_TRAITS_MEMBER(good_clipping)
102 IPC_STRUCT_TRAITS_MEMBER(at_top)
103 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot)
104IPC_STRUCT_TRAITS_END()
105
[email protected]fffaf972011-03-24 01:34:35106IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
107 IPC_STRUCT_TRAITS_MEMBER(count)
108 IPC_STRUCT_TRAITS_MEMBER(size)
109 IPC_STRUCT_TRAITS_MEMBER(liveSize)
110 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
111IPC_STRUCT_TRAITS_END()
112
113IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
114 IPC_STRUCT_TRAITS_MEMBER(images)
115 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
116 IPC_STRUCT_TRAITS_MEMBER(scripts)
117 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
118 IPC_STRUCT_TRAITS_MEMBER(fonts)
119IPC_STRUCT_TRAITS_END()
120
121IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
122 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
123 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
124 IPC_STRUCT_TRAITS_MEMBER(capacity)
125 IPC_STRUCT_TRAITS_MEMBER(liveSize)
126 IPC_STRUCT_TRAITS_MEMBER(deadSize)
127IPC_STRUCT_TRAITS_END()
128
[email protected]d5a04832011-03-12 21:46:26129//-----------------------------------------------------------------------------
130// RenderView messages
131// These are messages sent from the browser to the renderer process.
132
[email protected]d5a04832011-03-12 21:46:26133// Tells the renderer to set its maximum cache size to the supplied value.
134IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities,
135 size_t /* min_dead_capacity */,
136 size_t /* max_dead_capacity */,
137 size_t /* capacity */)
138
139// Tells the renderer to clear the cache.
140IPC_MESSAGE_CONTROL0(ViewMsg_ClearCache)
141
[email protected]55722152011-03-22 01:33:53142// Tells the renderer to dump as much memory as it can, perhaps because we
143// have memory pressure or the renderer is (or will be) paged out. This
144// should only result in purging objects we can recalculate, e.g. caches or
145// JS garbage, not in purging irreplaceable objects.
146IPC_MESSAGE_CONTROL0(ViewMsg_PurgeMemory)
147
[email protected]350019f2011-08-02 04:18:33148// For WebUI testing, this message stores parameters to do ScriptEvalRequest at
149// a time which is late enough to not be thrown out, and early enough to be
150// before onload events are fired.
151IPC_MESSAGE_ROUTED4(ViewMsg_WebUIJavaScript,
152 string16, /* frame_xpath */
153 string16, /* jscript_url */
154 int, /* ID */
155 bool /* If true, result is sent back. */)
156
[email protected]55722152011-03-22 01:33:53157// Tells the render view to capture a thumbnail image of the page. The
158// render view responds with a ViewHostMsg_Snapshot.
159IPC_MESSAGE_ROUTED0(ViewMsg_CaptureSnapshot)
[email protected]d5a04832011-03-12 21:46:26160
[email protected]d5a04832011-03-12 21:46:26161// History system notification that the visited link database has been
162// replaced. It has one SharedMemoryHandle argument consisting of the table
163// handle. This handle is valid in the context of the renderer
164IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_NewTable, base::SharedMemoryHandle)
165
166// History system notification that a link has been added and the link
167// coloring state for the given hash must be re-calculated.
168IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_Add, std::vector<uint64>)
169
170// History system notification that one or more history items have been
171// deleted, which at this point means that all link coloring state must be
172// re-calculated.
173IPC_MESSAGE_CONTROL0(ViewMsg_VisitedLink_Reset)
174
[email protected]d5a04832011-03-12 21:46:26175// Set the content settings for a particular url that the renderer is in the
176// process of loading. This will be stored, to be used if the load commits
177// and ignored otherwise.
178IPC_MESSAGE_ROUTED2(ViewMsg_SetContentSettingsForLoadingURL,
179 GURL /* url */,
180 ContentSettings /* content_settings */)
181
182// Set the content settings for a particular url, so all render views
183// displaying this host url update their content settings to match.
184IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL,
185 GURL /* url */,
186 ContentSettings /* content_settings */)
187
[email protected]6326d8b2011-06-17 10:39:09188// Set the content settings for a particular url that the renderer is in the
189// process of loading. This will be stored, to be used if the load commits
190// and ignored otherwise.
191IPC_MESSAGE_CONTROL1(ViewMsg_SetDefaultContentSettings,
192 ContentSettings /* content_settings */)
193
[email protected]d5a04832011-03-12 21:46:26194// Tells the render view to load all blocked plugins.
195IPC_MESSAGE_ROUTED0(ViewMsg_LoadBlockedPlugins)
196
[email protected]d5a04832011-03-12 21:46:26197// Asks the renderer to send back stats on the WebCore cache broken down by
198// resource types.
199IPC_MESSAGE_CONTROL0(ViewMsg_GetCacheResourceStats)
200
201// Asks the renderer to send back Histograms.
202IPC_MESSAGE_CONTROL1(ViewMsg_GetRendererHistograms,
203 int /* sequence number of Renderer Histograms. */)
204
[email protected]63a8ba12011-04-29 05:42:22205// Tells the renderer to create a FieldTrial, and by using a 100% probability
206// for the FieldTrial, forces the FieldTrial to have assigned group name.
207IPC_MESSAGE_CONTROL2(ViewMsg_SetFieldTrialGroup,
208 std::string /* field trial name */,
209 std::string /* group name that was assigned. */)
210
[email protected]d5a04832011-03-12 21:46:26211#if defined(USE_TCMALLOC)
212// Asks the renderer to send back tcmalloc stats.
213IPC_MESSAGE_CONTROL0(ViewMsg_GetRendererTcmalloc)
214#endif
215
216// Asks the renderer to send back V8 heap stats.
217IPC_MESSAGE_CONTROL0(ViewMsg_GetV8HeapStats)
218
[email protected]d5a04832011-03-12 21:46:26219// Posts a message to the renderer.
220IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
221 std::string /* The message */,
222 std::string /* The origin */,
223 std::string /* The target*/)
224
[email protected]d5a04832011-03-12 21:46:26225IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange,
226 string16 /* value */,
227 bool /* verbatim */,
228 int /* selection_start */,
229 int /* selection_end */)
230IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit,
231 string16 /* value */,
232 bool /* verbatim */)
233IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel)
234IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize,
235 gfx::Rect /* search_box_bounds */)
236IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant,
237 string16 /* value*/,
238 bool /* verbatim */,
239 int /* selection_start */,
240 int /* selection_end */)
241
[email protected]d5a04832011-03-12 21:46:26242// Tells the renderer to translate the page contents from one language to
243// another.
244IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage,
245 int /* page id */,
246 std::string, /* the script injected in the page */
247 std::string, /* BCP 47/RFC 5646 language code the page
248 is in */
249 std::string /* BCP 47/RFC 5646 language code to translate
250 to */)
251
252// Tells the renderer to revert the text of translated page to its original
253// contents.
254IPC_MESSAGE_ROUTED1(ViewMsg_RevertTranslation,
255 int /* page id */)
256
[email protected]16e923d2011-04-30 00:41:44257// Tells a renderer if it's currently being prerendered. Must only be set
258// to true before any navigation occurs, and only set to false at most once
259// after that.
260IPC_MESSAGE_ROUTED1(ViewMsg_SetIsPrerendering,
261 bool /* whether the RenderView is prerendering */)
262
[email protected]d5a04832011-03-12 21:46:26263// Sent on process startup to indicate whether this process is running in
264// incognito mode.
265IPC_MESSAGE_CONTROL1(ViewMsg_SetIsIncognitoProcess,
266 bool /* is_incognito_processs */)
267
[email protected]68cafdb2011-06-10 21:42:18268// Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
269IPC_MESSAGE_ROUTED1(ViewMsg_SetAllowDisplayingInsecureContent,
270 bool /* allowed */)
271
272// Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
273IPC_MESSAGE_ROUTED1(ViewMsg_SetAllowRunningInsecureContent,
274 bool /* allowed */)
275
[email protected]8c40da62011-07-13 22:58:46276// Sent when the profile changes the kSafeBrowsingEnabled preference.
277IPC_MESSAGE_ROUTED1(ViewMsg_SetClientSidePhishingDetection,
278 bool /* enable_phishing_detection */)
279
[email protected]d5a04832011-03-12 21:46:26280//-----------------------------------------------------------------------------
281// TabContents messages
282// These are messages sent from the renderer to the browser process.
283
[email protected]93b9d692011-04-13 00:44:31284// Provides the contents for the given page that was loaded recently.
285IPC_MESSAGE_ROUTED3(ViewHostMsg_PageContents,
286 GURL /* URL of the page */,
287 int32 /* page id */,
288 string16 /* page contents */)
289
290// Notification that the language for the tab has been determined.
291IPC_MESSAGE_ROUTED2(ViewHostMsg_TranslateLanguageDetermined,
292 std::string /* page ISO639_1 language code */,
293 bool /* whether the page can be translated */)
294
[email protected]d5a04832011-03-12 21:46:26295IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
296 WebKit::WebCache::UsageStats /* stats */)
297
[email protected]d5a04832011-03-12 21:46:26298// Tells the browser that content in the current page was blocked due to the
299// user's content settings.
300IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
301 ContentSettingsType, /* type of blocked content */
302 std::string /* resource identifier */)
303
[email protected]5327dfb2011-05-03 17:50:36304// Sent by the renderer process to check whether access to web databases is
[email protected]bac33eb2011-05-04 01:47:49305// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15306IPC_SYNC_MESSAGE_CONTROL5_1(ViewHostMsg_AllowDatabase,
[email protected]9a611a92011-05-07 17:06:18307 int /* render_view_id */,
308 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15309 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49310 string16 /* database name */,
311 string16 /* database display name */,
[email protected]8c276642011-05-06 09:41:00312 bool /* allowed */)
[email protected]bac33eb2011-05-04 01:47:49313
314// Sent by the renderer process to check whether access to DOM Storage is
315// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15316IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_AllowDOMStorage,
[email protected]bac33eb2011-05-04 01:47:49317 int /* render_view_id */,
318 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15319 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49320 DOMStorageType /* type */,
[email protected]8c276642011-05-06 09:41:00321 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36322
[email protected]45316d62011-05-12 18:15:30323// Sent by the renderer process to check whether access to FileSystem is
324// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15325IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_AllowFileSystem,
[email protected]45316d62011-05-12 18:15:30326 int /* render_view_id */,
327 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15328 GURL /* top origin url */,
[email protected]45316d62011-05-12 18:15:30329 bool /* allowed */)
330
[email protected]9a611a92011-05-07 17:06:18331// Sent by the renderer process to check whether access to Indexed DBis
332// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15333IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_AllowIndexedDB,
[email protected]9a611a92011-05-07 17:06:18334 int /* render_view_id */,
[email protected]c0a45a982011-05-25 16:58:15335 GURL /* origin_url */,
336 GURL /* top origin url */,
[email protected]9a611a92011-05-07 17:06:18337 string16 /* database name */,
338 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36339
[email protected]8093a542011-05-13 07:29:32340// Gets the content setting for a plugin.
341// If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
342// blocked by the content settings for |policy_url|. It still
343// appears in navigator.plugins in Javascript though, and can be
344// loaded via click-to-play.
345//
346// If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
347// explicitly white-listed for the plug-in, or the user has chosen
348// not to block nonsandboxed plugins.
349//
350// If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
351// neither blocked nor white-listed, which means that it's allowed
352// by default and can still be blocked if it's non-sandboxed.
353//
354IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetPluginContentSetting,
355 GURL /* policy_url */,
356 std::string /* resource */,
357 ContentSetting /* setting */)
358
[email protected]d5a04832011-03-12 21:46:26359// Specifies the URL as the first parameter (a wstring) and thumbnail as
360// binary data as the second parameter.
361IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail,
362 GURL /* url */,
363 ThumbnailScore /* score */,
364 SkBitmap /* bitmap */)
365
366// Send a snapshot of the tab contents to the render host.
367IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
368 SkBitmap /* bitmap */)
369
[email protected]d5a04832011-03-12 21:46:26370// Following message is used to communicate the values received by the
371// callback binding the JS to Cpp.
372// An instance of browser that has an automation host listening to it can
373// have a javascript send a native value (string, number, boolean) to the
374// listener in Cpp. (DomAutomationController)
375IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
376 std::string /* json_string */,
377 int /* automation_id */)
378
[email protected]d5a04832011-03-12 21:46:26379// A message for an external host.
380IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
381 std::string /* message */,
382 std::string /* origin */,
383 std::string /* target */)
384
[email protected]d5a04832011-03-12 21:46:26385// A renderer sends this to the browser process when it wants to start
386// a new instance of the Native Client process. The browser will launch
387// the process and return a handle to an IMC channel.
388IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
389 std::wstring /* url for the NaCl module */,
390 int /* socket count */,
391 std::vector<nacl::FileDescriptor>
392 /* imc channel handles */,
393 base::ProcessHandle /* NaCl process handle */,
394 base::ProcessId /* NaCl process id */)
395
[email protected]d5a04832011-03-12 21:46:26396// Notification that the page has an OpenSearch description document
397// associated with it.
398IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
399 int32 /* page_id */,
400 GURL /* url of OS description document */,
[email protected]c08e7932011-03-29 04:08:14401 search_provider::OSDDType)
[email protected]d5a04832011-03-12 21:46:26402
403// Find out if the given url's security origin is installed as a search
404// provider.
[email protected]c08e7932011-03-29 04:08:14405IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetSearchProviderInstallState,
406 GURL /* page url */,
407 GURL /* inquiry url */,
408 search_provider::InstallState /* install */)
[email protected]d5a04832011-03-12 21:46:26409
[email protected]d5a04832011-03-12 21:46:26410// Send back histograms as vector of pickled-histogram strings.
411IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererHistograms,
412 int, /* sequence number of Renderer Histograms. */
413 std::vector<std::string>)
414
415#if defined USE_TCMALLOC
416// Send back tcmalloc stats output.
417IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererTcmalloc,
418 int /* pid */,
419 std::string /* tcmalloc debug output */)
420#endif
421
422// Sends back stats about the V8 heap.
423IPC_MESSAGE_CONTROL2(ViewHostMsg_V8HeapStats,
424 int /* size of heap (allocated from the OS) */,
425 int /* bytes in use */)
426
427// Request for a DNS prefetch of the names in the array.
428// NameList is typedef'ed std::vector<std::string>
429IPC_MESSAGE_CONTROL1(ViewHostMsg_DnsPrefetch,
[email protected]2bf2bd92011-03-31 07:12:44430 std::vector<std::string> /* hostnames */)
[email protected]d5a04832011-03-12 21:46:26431
[email protected]f72a12c2011-04-29 11:52:30432// Requests the plugin policies.
433//
434// |outdated_policy| determines what to do about outdated plugins.
435// |authorize_policy| determines what to do about plugins that require
436// authorization to run.
437//
438// Both values can be ALLOW or ASK. |outdated_policy| can also be BLOCK.
439// Anything else is an error.
440// ALLOW means that the plugin should just run, as a normal plugin.
441// BLOCK means that the plugin should not run nor be allowed to run at all.
442// ASK means that the plugin should be initially blocked and the user should
443// be asked whether he wants to run the plugin.
[email protected]bac33eb2011-05-04 01:47:49444IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetPluginPolicies,
445 ContentSetting /* outdated_policy */,
446 ContentSetting /* authorize_policy */)
[email protected]2bf2bd92011-03-31 07:12:44447
[email protected]d5a04832011-03-12 21:46:26448// Notifies when a plugin couldn't be loaded because it's outdated.
449IPC_MESSAGE_ROUTED2(ViewHostMsg_BlockedOutdatedPlugin,
450 string16, /* name */
451 GURL /* update_url */)
452
[email protected]d5a04832011-03-12 21:46:26453// Provide the browser process with information about the WebCore resource
[email protected]872ae5b2011-05-26 20:20:50454// cache and current renderer framerate.
[email protected]d5a04832011-03-12 21:46:26455IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
456 WebKit::WebCache::ResourceTypeStats)
457
[email protected]d5a04832011-03-12 21:46:26458
459// Notifies the browser of the language (ISO 639_1 code language, such as fr,
460// en, zh...) of the current page.
461IPC_MESSAGE_ROUTED1(ViewHostMsg_PageLanguageDetermined,
462 std::string /* the language */)
463
464// Notifies the browser that a page has been translated.
465IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated,
466 int, /* page id */
467 std::string /* the original language */,
468 std::string /* the translated language */,
469 TranslateErrors::Type /* the error type if available */)
470
[email protected]16e923d2011-04-30 00:41:44471// Message sent from the renderer to the browser to notify it of events which
472// may lead to the cancellation of a prerender. The message is sent only when
473// the renderer is prerendering.
474IPC_MESSAGE_ROUTED0(ViewHostMsg_MaybeCancelPrerenderForHTML5Media)
475
[email protected]4c94b8c2011-05-17 16:17:45476// Message sent from the renderer to the browser to notify it of a
477// window.print() call which should cancel the prerender. The message is sent
478// only when the renderer is prerendering.
479IPC_MESSAGE_ROUTED0(ViewHostMsg_CancelPrerenderForPrinting)
480
[email protected]ab2eb9f2011-05-03 23:02:37481// Sent by the renderer to check if a URL has permission to trigger a clipboard
482// read/write operation from the DOM.
483IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_CanTriggerClipboardRead,
484 GURL /* url */,
485 bool /* allowed */)
486IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_CanTriggerClipboardWrite,
487 GURL /* url */,
488 bool /* allowed */)
489
[email protected]68cafdb2011-06-10 21:42:18490// Sent when the renderer was prevented from displaying insecure content in
491// a secure page by a security policy. The page may appear incomplete.
492IPC_MESSAGE_ROUTED0(ViewHostMsg_DidBlockDisplayingInsecureContent)
493
494// Sent when the renderer was prevented from running insecure content in
495// a secure origin by a security policy. The page may appear incomplete.
496IPC_MESSAGE_ROUTED0(ViewHostMsg_DidBlockRunningInsecureContent)
497
[email protected]d5a04832011-03-12 21:46:26498// Suggest results -----------------------------------------------------------
499
500IPC_MESSAGE_ROUTED3(ViewHostMsg_SetSuggestions,
501 int32 /* page_id */,
502 std::vector<std::string> /* suggestions */,
503 InstantCompleteBehavior)
504
505IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined,
506 int32 /* page_id */,
507 bool /* result */)
508
[email protected]d5a04832011-03-12 21:46:26509// JavaScript related messages -----------------------------------------------
510
511// Notify the JavaScript engine in the render to change its parameters
512// while performing stress testing.
513IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
514 int /* cmd */,
515 int /* param */)