blob: de0b79d21169f562bc8d427073cbae01a1e8facc [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]fffaf972011-03-24 01:34:3529#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
[email protected]fffaf972011-03-24 01:34:3530#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
[email protected]d5a04832011-03-12 21:46:2631#include "ui/gfx/rect.h"
[email protected]7a4de7a62010-08-17 18:38:2432
[email protected]44c49c92011-03-28 16:17:2333// Singly-included section for enums and custom IPC traits.
[email protected]d5a04832011-03-12 21:46:2634#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
35#define CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]049eec22010-10-20 21:32:5236
[email protected]992db4c2011-05-12 15:37:1537class SkBitmap;
38
[email protected]a6097f42011-01-10 08:50:5139// Command values for the cmd parameter of the
40// ViewHost_JavaScriptStressTestControl message. For each command the parameter
41// passed has a different meaning:
42// For the command kJavaScriptStressTestSetStressRunType the parameter it the
43// type taken from the enumeration v8::Testing::StressType.
44// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
45// number of the stress run about to take place.
46enum ViewHostMsg_JavaScriptStressTestControl_Commands {
47 kJavaScriptStressTestSetStressRunType = 0,
48 kJavaScriptStressTestPrepareStressRun = 1,
49};
50
[email protected]7d5c3ac2009-02-04 08:58:1951namespace IPC {
52
[email protected]661eb9d2009-02-03 02:11:4853#if defined(OS_POSIX)
54
55// TODO(port): this shouldn't exist. However, the plugin stuff is really using
56// HWNDS (NativeView), and making Windows calls based on them. I've not figured
57// out the deal with plugins yet.
58template <>
59struct ParamTraits<gfx::NativeView> {
60 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1961 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4862 NOTIMPLEMENTED();
63 }
64
[email protected]7d5c3ac2009-02-04 08:58:1965 static bool Read(const Message* m, void** iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4866 NOTIMPLEMENTED();
67 *p = NULL;
68 return true;
69 }
70
[email protected]252cad62010-08-18 18:33:5771 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:4872 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:4873 }
74};
75
76#endif // defined(OS_POSIX)
77
[email protected]7b291f92009-08-14 05:43:5378template <>
[email protected]fffaf972011-03-24 01:34:3579struct ParamTraits<ContentSettings> {
80 typedef ContentSettings param_type;
81 static void Write(Message* m, const param_type& p);
82 static bool Read(const Message* m, void** iter, param_type* r);
83 static void Log(const param_type& p, std::string* l);
[email protected]7b291f92009-08-14 05:43:5384};
[email protected]1b9af292009-07-09 04:30:3085
[email protected]b3df5a42010-05-11 14:31:0986} // namespace IPC
[email protected]9f4db512010-05-10 20:21:4187
[email protected]5a52f162008-08-27 04:15:3188#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:2689
[email protected]778574e2011-03-21 22:03:5090#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:2691
[email protected]fffaf972011-03-24 01:34:3592IPC_ENUM_TRAITS(InstantCompleteBehavior)
[email protected]c08e7932011-03-29 04:08:1493IPC_ENUM_TRAITS(search_provider::OSDDType)
94IPC_ENUM_TRAITS(search_provider::InstallState)
[email protected]fffaf972011-03-24 01:34:3595IPC_ENUM_TRAITS(TranslateErrors::Type)
[email protected]fffaf972011-03-24 01:34:3596IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]fffaf972011-03-24 01:34:3597
98IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
99 IPC_STRUCT_TRAITS_MEMBER(boring_score)
100 IPC_STRUCT_TRAITS_MEMBER(good_clipping)
101 IPC_STRUCT_TRAITS_MEMBER(at_top)
102 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot)
103IPC_STRUCT_TRAITS_END()
104
[email protected]fffaf972011-03-24 01:34:35105IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
106 IPC_STRUCT_TRAITS_MEMBER(count)
107 IPC_STRUCT_TRAITS_MEMBER(size)
108 IPC_STRUCT_TRAITS_MEMBER(liveSize)
109 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
110IPC_STRUCT_TRAITS_END()
111
112IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
113 IPC_STRUCT_TRAITS_MEMBER(images)
114 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
115 IPC_STRUCT_TRAITS_MEMBER(scripts)
116 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
117 IPC_STRUCT_TRAITS_MEMBER(fonts)
118IPC_STRUCT_TRAITS_END()
119
120IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
121 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
122 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
123 IPC_STRUCT_TRAITS_MEMBER(capacity)
124 IPC_STRUCT_TRAITS_MEMBER(liveSize)
125 IPC_STRUCT_TRAITS_MEMBER(deadSize)
126IPC_STRUCT_TRAITS_END()
127
[email protected]d5a04832011-03-12 21:46:26128//-----------------------------------------------------------------------------
129// RenderView messages
130// These are messages sent from the browser to the renderer process.
131
[email protected]d5a04832011-03-12 21:46:26132// Tells the renderer to set its maximum cache size to the supplied value.
133IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities,
134 size_t /* min_dead_capacity */,
135 size_t /* max_dead_capacity */,
136 size_t /* capacity */)
137
138// Tells the renderer to clear the cache.
139IPC_MESSAGE_CONTROL0(ViewMsg_ClearCache)
140
[email protected]55722152011-03-22 01:33:53141// Tells the renderer to dump as much memory as it can, perhaps because we
142// have memory pressure or the renderer is (or will be) paged out. This
143// should only result in purging objects we can recalculate, e.g. caches or
144// JS garbage, not in purging irreplaceable objects.
145IPC_MESSAGE_CONTROL0(ViewMsg_PurgeMemory)
146
147// Tells the render view to capture a thumbnail image of the page. The
148// render view responds with a ViewHostMsg_Snapshot.
149IPC_MESSAGE_ROUTED0(ViewMsg_CaptureSnapshot)
[email protected]d5a04832011-03-12 21:46:26150
[email protected]d5a04832011-03-12 21:46:26151// History system notification that the visited link database has been
152// replaced. It has one SharedMemoryHandle argument consisting of the table
153// handle. This handle is valid in the context of the renderer
154IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_NewTable, base::SharedMemoryHandle)
155
156// History system notification that a link has been added and the link
157// coloring state for the given hash must be re-calculated.
158IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_Add, std::vector<uint64>)
159
160// History system notification that one or more history items have been
161// deleted, which at this point means that all link coloring state must be
162// re-calculated.
163IPC_MESSAGE_CONTROL0(ViewMsg_VisitedLink_Reset)
164
[email protected]d5a04832011-03-12 21:46:26165// Set the content settings for a particular url that the renderer is in the
166// process of loading. This will be stored, to be used if the load commits
167// and ignored otherwise.
168IPC_MESSAGE_ROUTED2(ViewMsg_SetContentSettingsForLoadingURL,
169 GURL /* url */,
170 ContentSettings /* content_settings */)
171
172// Set the content settings for a particular url, so all render views
173// displaying this host url update their content settings to match.
174IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL,
175 GURL /* url */,
176 ContentSettings /* content_settings */)
177
[email protected]d5a04832011-03-12 21:46:26178// Tells the render view to load all blocked plugins.
179IPC_MESSAGE_ROUTED0(ViewMsg_LoadBlockedPlugins)
180
[email protected]d5a04832011-03-12 21:46:26181// Used to instruct the RenderView to go into "view source" mode.
182IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
183
184// Get all savable resource links from current webpage, include main
185// frame and sub-frame.
186IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
187 GURL /* url of page which is needed to save */)
188
189// Get html data by serializing all frames of current page with lists
190// which contain all resource links that have local copy.
191IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
192 std::vector<GURL> /* urls that have local copy */,
193 std::vector<FilePath> /* paths of local copy */,
194 FilePath /* local directory path */)
195
[email protected]d5a04832011-03-12 21:46:26196// Asks the renderer to send back stats on the WebCore cache broken down by
197// resource types.
198IPC_MESSAGE_CONTROL0(ViewMsg_GetCacheResourceStats)
199
200// Asks the renderer to send back Histograms.
201IPC_MESSAGE_CONTROL1(ViewMsg_GetRendererHistograms,
202 int /* sequence number of Renderer Histograms. */)
203
[email protected]63a8ba12011-04-29 05:42:22204// Tells the renderer to create a FieldTrial, and by using a 100% probability
205// for the FieldTrial, forces the FieldTrial to have assigned group name.
206IPC_MESSAGE_CONTROL2(ViewMsg_SetFieldTrialGroup,
207 std::string /* field trial name */,
208 std::string /* group name that was assigned. */)
209
[email protected]d5a04832011-03-12 21:46:26210#if defined(USE_TCMALLOC)
211// Asks the renderer to send back tcmalloc stats.
212IPC_MESSAGE_CONTROL0(ViewMsg_GetRendererTcmalloc)
213#endif
214
215// Asks the renderer to send back V8 heap stats.
216IPC_MESSAGE_CONTROL0(ViewMsg_GetV8HeapStats)
217
[email protected]d5a04832011-03-12 21:46:26218// Posts a message to the renderer.
219IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
220 std::string /* The message */,
221 std::string /* The origin */,
222 std::string /* The target*/)
223
[email protected]d5a04832011-03-12 21:46:26224IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange,
225 string16 /* value */,
226 bool /* verbatim */,
227 int /* selection_start */,
228 int /* selection_end */)
229IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit,
230 string16 /* value */,
231 bool /* verbatim */)
232IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel)
233IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize,
234 gfx::Rect /* search_box_bounds */)
235IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant,
236 string16 /* value*/,
237 bool /* verbatim */,
238 int /* selection_start */,
239 int /* selection_end */)
240
[email protected]d5a04832011-03-12 21:46:26241// Tells the renderer to translate the page contents from one language to
242// another.
243IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage,
244 int /* page id */,
245 std::string, /* the script injected in the page */
246 std::string, /* BCP 47/RFC 5646 language code the page
247 is in */
248 std::string /* BCP 47/RFC 5646 language code to translate
249 to */)
250
251// Tells the renderer to revert the text of translated page to its original
252// contents.
253IPC_MESSAGE_ROUTED1(ViewMsg_RevertTranslation,
254 int /* page id */)
255
[email protected]16e923d2011-04-30 00:41:44256// Tells a renderer if it's currently being prerendered. Must only be set
257// to true before any navigation occurs, and only set to false at most once
258// after that.
259IPC_MESSAGE_ROUTED1(ViewMsg_SetIsPrerendering,
260 bool /* whether the RenderView is prerendering */)
261
[email protected]d5a04832011-03-12 21:46:26262// Sent on process startup to indicate whether this process is running in
263// incognito mode.
264IPC_MESSAGE_CONTROL1(ViewMsg_SetIsIncognitoProcess,
265 bool /* is_incognito_processs */)
266
[email protected]d5a04832011-03-12 21:46:26267//-----------------------------------------------------------------------------
268// TabContents messages
269// These are messages sent from the renderer to the browser process.
270
[email protected]93b9d692011-04-13 00:44:31271// Provides the contents for the given page that was loaded recently.
272IPC_MESSAGE_ROUTED3(ViewHostMsg_PageContents,
273 GURL /* URL of the page */,
274 int32 /* page id */,
275 string16 /* page contents */)
276
277// Notification that the language for the tab has been determined.
278IPC_MESSAGE_ROUTED2(ViewHostMsg_TranslateLanguageDetermined,
279 std::string /* page ISO639_1 language code */,
280 bool /* whether the page can be translated */)
281
[email protected]d5a04832011-03-12 21:46:26282IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
283 WebKit::WebCache::UsageStats /* stats */)
284
[email protected]d5a04832011-03-12 21:46:26285// Tells the browser that content in the current page was blocked due to the
286// user's content settings.
287IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
288 ContentSettingsType, /* type of blocked content */
289 std::string /* resource identifier */)
290
[email protected]5327dfb2011-05-03 17:50:36291// Sent by the renderer process to check whether access to web databases is
[email protected]bac33eb2011-05-04 01:47:49292// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15293IPC_SYNC_MESSAGE_CONTROL5_1(ViewHostMsg_AllowDatabase,
[email protected]9a611a92011-05-07 17:06:18294 int /* render_view_id */,
295 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15296 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49297 string16 /* database name */,
298 string16 /* database display name */,
[email protected]8c276642011-05-06 09:41:00299 bool /* allowed */)
[email protected]bac33eb2011-05-04 01:47:49300
301// Sent by the renderer process to check whether access to DOM Storage is
302// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15303IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_AllowDOMStorage,
[email protected]bac33eb2011-05-04 01:47:49304 int /* render_view_id */,
305 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15306 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49307 DOMStorageType /* type */,
[email protected]8c276642011-05-06 09:41:00308 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36309
[email protected]45316d62011-05-12 18:15:30310// Sent by the renderer process to check whether access to FileSystem is
311// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15312IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_AllowFileSystem,
[email protected]45316d62011-05-12 18:15:30313 int /* render_view_id */,
314 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15315 GURL /* top origin url */,
[email protected]45316d62011-05-12 18:15:30316 bool /* allowed */)
317
[email protected]9a611a92011-05-07 17:06:18318// Sent by the renderer process to check whether access to Indexed DBis
319// granted by content settings.
[email protected]c0a45a982011-05-25 16:58:15320IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_AllowIndexedDB,
[email protected]9a611a92011-05-07 17:06:18321 int /* render_view_id */,
[email protected]c0a45a982011-05-25 16:58:15322 GURL /* origin_url */,
323 GURL /* top origin url */,
[email protected]9a611a92011-05-07 17:06:18324 string16 /* database name */,
325 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36326
[email protected]8093a542011-05-13 07:29:32327// Gets the content setting for a plugin.
328// If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
329// blocked by the content settings for |policy_url|. It still
330// appears in navigator.plugins in Javascript though, and can be
331// loaded via click-to-play.
332//
333// If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
334// explicitly white-listed for the plug-in, or the user has chosen
335// not to block nonsandboxed plugins.
336//
337// If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
338// neither blocked nor white-listed, which means that it's allowed
339// by default and can still be blocked if it's non-sandboxed.
340//
341IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetPluginContentSetting,
342 GURL /* policy_url */,
343 std::string /* resource */,
344 ContentSetting /* setting */)
345
[email protected]d5a04832011-03-12 21:46:26346// Specifies the URL as the first parameter (a wstring) and thumbnail as
347// binary data as the second parameter.
348IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail,
349 GURL /* url */,
350 ThumbnailScore /* score */,
351 SkBitmap /* bitmap */)
352
353// Send a snapshot of the tab contents to the render host.
354IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
355 SkBitmap /* bitmap */)
356
[email protected]d5a04832011-03-12 21:46:26357// Following message is used to communicate the values received by the
358// callback binding the JS to Cpp.
359// An instance of browser that has an automation host listening to it can
360// have a javascript send a native value (string, number, boolean) to the
361// listener in Cpp. (DomAutomationController)
362IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
363 std::string /* json_string */,
364 int /* automation_id */)
365
[email protected]d5a04832011-03-12 21:46:26366// A message for an external host.
367IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
368 std::string /* message */,
369 std::string /* origin */,
370 std::string /* target */)
371
[email protected]d5a04832011-03-12 21:46:26372// A renderer sends this to the browser process when it wants to start
373// a new instance of the Native Client process. The browser will launch
374// the process and return a handle to an IMC channel.
375IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
376 std::wstring /* url for the NaCl module */,
377 int /* socket count */,
378 std::vector<nacl::FileDescriptor>
379 /* imc channel handles */,
380 base::ProcessHandle /* NaCl process handle */,
381 base::ProcessId /* NaCl process id */)
382
[email protected]d5a04832011-03-12 21:46:26383// Notification that the page has an OpenSearch description document
384// associated with it.
385IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
386 int32 /* page_id */,
387 GURL /* url of OS description document */,
[email protected]c08e7932011-03-29 04:08:14388 search_provider::OSDDType)
[email protected]d5a04832011-03-12 21:46:26389
390// Find out if the given url's security origin is installed as a search
391// provider.
[email protected]c08e7932011-03-29 04:08:14392IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetSearchProviderInstallState,
393 GURL /* page url */,
394 GURL /* inquiry url */,
395 search_provider::InstallState /* install */)
[email protected]d5a04832011-03-12 21:46:26396
[email protected]d5a04832011-03-12 21:46:26397// Send back histograms as vector of pickled-histogram strings.
398IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererHistograms,
399 int, /* sequence number of Renderer Histograms. */
400 std::vector<std::string>)
401
402#if defined USE_TCMALLOC
403// Send back tcmalloc stats output.
404IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererTcmalloc,
405 int /* pid */,
406 std::string /* tcmalloc debug output */)
407#endif
408
409// Sends back stats about the V8 heap.
410IPC_MESSAGE_CONTROL2(ViewHostMsg_V8HeapStats,
411 int /* size of heap (allocated from the OS) */,
412 int /* bytes in use */)
413
414// Request for a DNS prefetch of the names in the array.
415// NameList is typedef'ed std::vector<std::string>
416IPC_MESSAGE_CONTROL1(ViewHostMsg_DnsPrefetch,
[email protected]2bf2bd92011-03-31 07:12:44417 std::vector<std::string> /* hostnames */)
[email protected]d5a04832011-03-12 21:46:26418
[email protected]f72a12c2011-04-29 11:52:30419// Requests the plugin policies.
420//
421// |outdated_policy| determines what to do about outdated plugins.
422// |authorize_policy| determines what to do about plugins that require
423// authorization to run.
424//
425// Both values can be ALLOW or ASK. |outdated_policy| can also be BLOCK.
426// Anything else is an error.
427// ALLOW means that the plugin should just run, as a normal plugin.
428// BLOCK means that the plugin should not run nor be allowed to run at all.
429// ASK means that the plugin should be initially blocked and the user should
430// be asked whether he wants to run the plugin.
[email protected]bac33eb2011-05-04 01:47:49431IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetPluginPolicies,
432 ContentSetting /* outdated_policy */,
433 ContentSetting /* authorize_policy */)
[email protected]2bf2bd92011-03-31 07:12:44434
[email protected]d5a04832011-03-12 21:46:26435// Notifies when a plugin couldn't be loaded because it's outdated.
436IPC_MESSAGE_ROUTED2(ViewHostMsg_BlockedOutdatedPlugin,
437 string16, /* name */
438 GURL /* update_url */)
439
[email protected]d5a04832011-03-12 21:46:26440IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
441 std::vector<GURL> /* all savable resource links */,
442 std::vector<GURL> /* all referrers of resource links */,
443 std::vector<GURL> /* all frame links */)
444
445IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
446 GURL /* frame's url */,
447 std::string /* data buffer */,
448 int32 /* complete status */)
449
[email protected]d5a04832011-03-12 21:46:26450// Provide the browser process with information about the WebCore resource
[email protected]872ae5b2011-05-26 20:20:50451// cache and current renderer framerate.
[email protected]d5a04832011-03-12 21:46:26452IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
453 WebKit::WebCache::ResourceTypeStats)
454
[email protected]d5a04832011-03-12 21:46:26455
456// Notifies the browser of the language (ISO 639_1 code language, such as fr,
457// en, zh...) of the current page.
458IPC_MESSAGE_ROUTED1(ViewHostMsg_PageLanguageDetermined,
459 std::string /* the language */)
460
461// Notifies the browser that a page has been translated.
462IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated,
463 int, /* page id */
464 std::string /* the original language */,
465 std::string /* the translated language */,
466 TranslateErrors::Type /* the error type if available */)
467
[email protected]16e923d2011-04-30 00:41:44468// Message sent from the renderer to the browser to notify it of events which
469// may lead to the cancellation of a prerender. The message is sent only when
470// the renderer is prerendering.
471IPC_MESSAGE_ROUTED0(ViewHostMsg_MaybeCancelPrerenderForHTML5Media)
472
[email protected]4c94b8c2011-05-17 16:17:45473// Message sent from the renderer to the browser to notify it of a
474// window.print() call which should cancel the prerender. The message is sent
475// only when the renderer is prerendering.
476IPC_MESSAGE_ROUTED0(ViewHostMsg_CancelPrerenderForPrinting)
477
[email protected]ab2eb9f2011-05-03 23:02:37478// Sent by the renderer to check if a URL has permission to trigger a clipboard
479// read/write operation from the DOM.
480IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_CanTriggerClipboardRead,
481 GURL /* url */,
482 bool /* allowed */)
483IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_CanTriggerClipboardWrite,
484 GURL /* url */,
485 bool /* allowed */)
486
[email protected]d5a04832011-03-12 21:46:26487// Suggest results -----------------------------------------------------------
488
489IPC_MESSAGE_ROUTED3(ViewHostMsg_SetSuggestions,
490 int32 /* page_id */,
491 std::vector<std::string> /* suggestions */,
492 InstantCompleteBehavior)
493
494IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined,
495 int32 /* page_id */,
496 bool /* result */)
497
[email protected]d5a04832011-03-12 21:46:26498// JavaScript related messages -----------------------------------------------
499
500// Notify the JavaScript engine in the render to change its parameters
501// while performing stress testing.
502IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
503 int /* cmd */,
504 int /* param */)