blob: 5bc662617098cfd9a09772cc845674e2a68f68c6 [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]d5a04832011-03-12 21:46:2618#include "base/values.h"
19#include "build/build_config.h"
[email protected]d5a04832011-03-12 21:46:2620#include "chrome/common/content_settings.h"
[email protected]1c9c7fb2011-03-11 16:38:3821#include "chrome/common/instant_types.h"
[email protected]d5a04832011-03-12 21:46:2622#include "chrome/common/nacl_types.h"
[email protected]d5a04832011-03-12 21:46:2623#include "chrome/common/render_messages_params.h"
24#include "chrome/common/thumbnail_score.h"
[email protected]152b8ba32010-03-29 19:40:1625#include "chrome/common/translate_errors.h"
[email protected]7b291f92009-08-14 05:43:5326#include "chrome/common/view_types.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 "third_party/skia/include/core/SkBitmap.h"
32#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]770dd8b2010-05-24 18:11:3938// Values that may be OR'd together to form the 'flags' parameter of the
39// ViewMsg_EnablePreferredSizeChangedMode message.
40enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags {
41 kPreferredSizeNothing,
42 kPreferredSizeWidth = 1 << 0,
43 // Requesting the height currently requires a polling loop in render_view.cc.
44 kPreferredSizeHeightThisIsSlow = 1 << 1,
45};
46
[email protected]a6097f42011-01-10 08:50:5147// Command values for the cmd parameter of the
48// ViewHost_JavaScriptStressTestControl message. For each command the parameter
49// passed has a different meaning:
50// For the command kJavaScriptStressTestSetStressRunType the parameter it the
51// type taken from the enumeration v8::Testing::StressType.
52// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
53// number of the stress run about to take place.
54enum ViewHostMsg_JavaScriptStressTestControl_Commands {
55 kJavaScriptStressTestSetStressRunType = 0,
56 kJavaScriptStressTestPrepareStressRun = 1,
57};
58
[email protected]7d5c3ac2009-02-04 08:58:1959namespace IPC {
60
[email protected]661eb9d2009-02-03 02:11:4861#if defined(OS_POSIX)
62
63// TODO(port): this shouldn't exist. However, the plugin stuff is really using
64// HWNDS (NativeView), and making Windows calls based on them. I've not figured
65// out the deal with plugins yet.
66template <>
67struct ParamTraits<gfx::NativeView> {
68 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1969 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4870 NOTIMPLEMENTED();
71 }
72
[email protected]7d5c3ac2009-02-04 08:58:1973 static bool Read(const Message* m, void** iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4874 NOTIMPLEMENTED();
75 *p = NULL;
76 return true;
77 }
78
[email protected]252cad62010-08-18 18:33:5779 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:4880 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:4881 }
82};
83
84#endif // defined(OS_POSIX)
85
[email protected]7b291f92009-08-14 05:43:5386template <>
[email protected]fffaf972011-03-24 01:34:3587struct ParamTraits<ContentSettings> {
88 typedef ContentSettings param_type;
89 static void Write(Message* m, const param_type& p);
90 static bool Read(const Message* m, void** iter, param_type* r);
91 static void Log(const param_type& p, std::string* l);
[email protected]7b291f92009-08-14 05:43:5392};
[email protected]1b9af292009-07-09 04:30:3093
[email protected]b3df5a42010-05-11 14:31:0994} // namespace IPC
[email protected]9f4db512010-05-10 20:21:4195
[email protected]5a52f162008-08-27 04:15:3196#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:2697
[email protected]778574e2011-03-21 22:03:5098#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:2699
[email protected]fffaf972011-03-24 01:34:35100IPC_ENUM_TRAITS(ContentSetting)
101IPC_ENUM_TRAITS(ContentSettingsType)
102IPC_ENUM_TRAITS(InstantCompleteBehavior)
103IPC_ENUM_TRAITS(TranslateErrors::Type)
104IPC_ENUM_TRAITS(ViewType::Type)
105IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]fffaf972011-03-24 01:34:35106
107IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
108 IPC_STRUCT_TRAITS_MEMBER(boring_score)
109 IPC_STRUCT_TRAITS_MEMBER(good_clipping)
110 IPC_STRUCT_TRAITS_MEMBER(at_top)
111 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot)
112IPC_STRUCT_TRAITS_END()
113
[email protected]fffaf972011-03-24 01:34:35114IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
115 IPC_STRUCT_TRAITS_MEMBER(count)
116 IPC_STRUCT_TRAITS_MEMBER(size)
117 IPC_STRUCT_TRAITS_MEMBER(liveSize)
118 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
119IPC_STRUCT_TRAITS_END()
120
121IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
122 IPC_STRUCT_TRAITS_MEMBER(images)
123 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
124 IPC_STRUCT_TRAITS_MEMBER(scripts)
125 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
126 IPC_STRUCT_TRAITS_MEMBER(fonts)
127IPC_STRUCT_TRAITS_END()
128
129IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
130 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
131 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
132 IPC_STRUCT_TRAITS_MEMBER(capacity)
133 IPC_STRUCT_TRAITS_MEMBER(liveSize)
134 IPC_STRUCT_TRAITS_MEMBER(deadSize)
135IPC_STRUCT_TRAITS_END()
136
[email protected]d5a04832011-03-12 21:46:26137//-----------------------------------------------------------------------------
138// RenderView messages
139// These are messages sent from the browser to the renderer process.
140
[email protected]d5a04832011-03-12 21:46:26141// Tells the renderer to set its maximum cache size to the supplied value.
142IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities,
143 size_t /* min_dead_capacity */,
144 size_t /* max_dead_capacity */,
145 size_t /* capacity */)
146
147// Tells the renderer to clear the cache.
148IPC_MESSAGE_CONTROL0(ViewMsg_ClearCache)
149
[email protected]55722152011-03-22 01:33:53150// Tells the renderer to dump as much memory as it can, perhaps because we
151// have memory pressure or the renderer is (or will be) paged out. This
152// should only result in purging objects we can recalculate, e.g. caches or
153// JS garbage, not in purging irreplaceable objects.
154IPC_MESSAGE_CONTROL0(ViewMsg_PurgeMemory)
155
156// Tells the render view to capture a thumbnail image of the page. The
157// render view responds with a ViewHostMsg_Snapshot.
158IPC_MESSAGE_ROUTED0(ViewMsg_CaptureSnapshot)
[email protected]d5a04832011-03-12 21:46:26159
[email protected]d5a04832011-03-12 21:46:26160// History system notification that the visited link database has been
161// replaced. It has one SharedMemoryHandle argument consisting of the table
162// handle. This handle is valid in the context of the renderer
163IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_NewTable, base::SharedMemoryHandle)
164
165// History system notification that a link has been added and the link
166// coloring state for the given hash must be re-calculated.
167IPC_MESSAGE_CONTROL1(ViewMsg_VisitedLink_Add, std::vector<uint64>)
168
169// History system notification that one or more history items have been
170// deleted, which at this point means that all link coloring state must be
171// re-calculated.
172IPC_MESSAGE_CONTROL0(ViewMsg_VisitedLink_Reset)
173
174// Notification that the user scripts have been updated. It has one
175// SharedMemoryHandle argument consisting of the pickled script data. This
176// handle is valid in the context of the renderer.
177IPC_MESSAGE_CONTROL1(ViewMsg_UserScripts_UpdatedScripts,
178 base::SharedMemoryHandle)
179
[email protected]d5a04832011-03-12 21:46:26180// Sent when user prompting is required before a ViewHostMsg_GetCookies
181// message can complete. This message indicates that the renderer should
182// pump messages while waiting for cookies.
183IPC_MESSAGE_CONTROL0(ViewMsg_SignalCookiePromptEvent)
184
[email protected]d5a04832011-03-12 21:46:26185// Set the content settings for a particular url that the renderer is in the
186// process of loading. This will be stored, to be used if the load commits
187// and ignored otherwise.
188IPC_MESSAGE_ROUTED2(ViewMsg_SetContentSettingsForLoadingURL,
189 GURL /* url */,
190 ContentSettings /* content_settings */)
191
192// Set the content settings for a particular url, so all render views
193// displaying this host url update their content settings to match.
194IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL,
195 GURL /* url */,
196 ContentSettings /* content_settings */)
197
[email protected]d5a04832011-03-12 21:46:26198// Install the first missing pluign.
199IPC_MESSAGE_ROUTED0(ViewMsg_InstallMissingPlugin)
200
201// Tells the renderer to empty its plugin list cache, optional reloading
202// pages containing plugins.
203IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache,
204 bool /* reload_pages */)
205
206// Tells the render view to load all blocked plugins.
207IPC_MESSAGE_ROUTED0(ViewMsg_LoadBlockedPlugins)
208
209// Tells the render view a prerendered page is about to be displayed.
210IPC_MESSAGE_ROUTED0(ViewMsg_DisplayPrerenderedPage)
211
[email protected]d5a04832011-03-12 21:46:26212// Used to instruct the RenderView to go into "view source" mode.
213IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
214
215// Get all savable resource links from current webpage, include main
216// frame and sub-frame.
217IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage,
218 GURL /* url of page which is needed to save */)
219
220// Get html data by serializing all frames of current page with lists
221// which contain all resource links that have local copy.
222IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
223 std::vector<GURL> /* urls that have local copy */,
224 std::vector<FilePath> /* paths of local copy */,
225 FilePath /* local directory path */)
226
[email protected]d5a04832011-03-12 21:46:26227// Requests the renderer to download the specified favicon image encode it as
[email protected]d8e74e82011-03-15 19:38:48228// PNG and send the PNG data back ala ViewHostMsg_DidDownloadFavicon.
229IPC_MESSAGE_ROUTED3(ViewMsg_DownloadFavicon,
[email protected]d5a04832011-03-12 21:46:26230 int /* identifier for the request */,
231 GURL /* URL of the image */,
232 int /* Size of the image. Normally 0, but set if you have
233 a preferred image size to request, such as when
234 downloading the favicon */)
235
[email protected]d5a04832011-03-12 21:46:26236// Asks the renderer to send back stats on the WebCore cache broken down by
237// resource types.
238IPC_MESSAGE_CONTROL0(ViewMsg_GetCacheResourceStats)
239
240// Asks the renderer to send back Histograms.
241IPC_MESSAGE_CONTROL1(ViewMsg_GetRendererHistograms,
242 int /* sequence number of Renderer Histograms. */)
243
244#if defined(USE_TCMALLOC)
245// Asks the renderer to send back tcmalloc stats.
246IPC_MESSAGE_CONTROL0(ViewMsg_GetRendererTcmalloc)
247#endif
248
249// Asks the renderer to send back V8 heap stats.
250IPC_MESSAGE_CONTROL0(ViewMsg_GetV8HeapStats)
251
[email protected]d5a04832011-03-12 21:46:26252// Posts a message to the renderer.
253IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
254 std::string /* The message */,
255 std::string /* The origin */,
256 std::string /* The target*/)
257
258// Sent to the renderer when a popup window should no longer count against
259// the current popup count (either because it's not a popup or because it was
260// a generated by a user action or because a constrained popup got turned
261// into a full window).
262IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
263
[email protected]d5a04832011-03-12 21:46:26264// Sent by the Browser process to alert a window about whether a it should
265// allow a scripted window.close(). The renderer assumes every new window is a
266// blocked popup until notified otherwise.
267IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose,
268 bool /* script_can_close */)
269
[email protected]d5a04832011-03-12 21:46:26270IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange,
271 string16 /* value */,
272 bool /* verbatim */,
273 int /* selection_start */,
274 int /* selection_end */)
275IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit,
276 string16 /* value */,
277 bool /* verbatim */)
278IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel)
279IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize,
280 gfx::Rect /* search_box_bounds */)
281IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant,
282 string16 /* value*/,
283 bool /* verbatim */,
284 int /* selection_start */,
285 int /* selection_end */)
286
[email protected]d5a04832011-03-12 21:46:26287// Tell the renderer which browser window it's being attached to.
288IPC_MESSAGE_ROUTED1(ViewMsg_UpdateBrowserWindowId,
289 int /* id of browser window */)
290
291// Tell the renderer which type this view is.
292IPC_MESSAGE_ROUTED1(ViewMsg_NotifyRenderViewType,
293 ViewType::Type /* view_type */)
294
[email protected]d5a04832011-03-12 21:46:26295// Tells the renderer to translate the page contents from one language to
296// another.
297IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage,
298 int /* page id */,
299 std::string, /* the script injected in the page */
300 std::string, /* BCP 47/RFC 5646 language code the page
301 is in */
302 std::string /* BCP 47/RFC 5646 language code to translate
303 to */)
304
305// Tells the renderer to revert the text of translated page to its original
306// contents.
307IPC_MESSAGE_ROUTED1(ViewMsg_RevertTranslation,
308 int /* page id */)
309
[email protected]d5a04832011-03-12 21:46:26310// Sent on process startup to indicate whether this process is running in
311// incognito mode.
312IPC_MESSAGE_CONTROL1(ViewMsg_SetIsIncognitoProcess,
313 bool /* is_incognito_processs */)
314
[email protected]d5a04832011-03-12 21:46:26315//-----------------------------------------------------------------------------
316// TabContents messages
317// These are messages sent from the renderer to the browser process.
318
[email protected]d5a04832011-03-12 21:46:26319IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
320 WebKit::WebCache::UsageStats /* stats */)
321
[email protected]d5a04832011-03-12 21:46:26322// Tells the browser that content in the current page was blocked due to the
323// user's content settings.
324IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
325 ContentSettingsType, /* type of blocked content */
326 std::string /* resource identifier */)
327
[email protected]d5a04832011-03-12 21:46:26328// Specifies the URL as the first parameter (a wstring) and thumbnail as
329// binary data as the second parameter.
330IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail,
331 GURL /* url */,
332 ThumbnailScore /* score */,
333 SkBitmap /* bitmap */)
334
335// Send a snapshot of the tab contents to the render host.
336IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
337 SkBitmap /* bitmap */)
338
339// Notification that the url for the favicon of a site has been determined.
[email protected]d8e74e82011-03-15 19:38:48340IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
[email protected]d5a04832011-03-12 21:46:26341 int32 /* page_id */,
342 GURL /* url of the favicon */)
343
[email protected]d5a04832011-03-12 21:46:26344// Following message is used to communicate the values received by the
345// callback binding the JS to Cpp.
346// An instance of browser that has an automation host listening to it can
347// have a javascript send a native value (string, number, boolean) to the
348// listener in Cpp. (DomAutomationController)
349IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
350 std::string /* json_string */,
351 int /* automation_id */)
352
[email protected]d5a04832011-03-12 21:46:26353// A message for an external host.
354IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
355 std::string /* message */,
356 std::string /* origin */,
357 std::string /* target */)
358
[email protected]d5a04832011-03-12 21:46:26359// A renderer sends this to the browser process when it wants to start
360// a new instance of the Native Client process. The browser will launch
361// the process and return a handle to an IMC channel.
362IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
363 std::wstring /* url for the NaCl module */,
364 int /* socket count */,
365 std::vector<nacl::FileDescriptor>
366 /* imc channel handles */,
367 base::ProcessHandle /* NaCl process handle */,
368 base::ProcessId /* NaCl process id */)
369
[email protected]d5a04832011-03-12 21:46:26370// Notification that the page has an OpenSearch description document
371// associated with it.
372IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
373 int32 /* page_id */,
374 GURL /* url of OS description document */,
375 ViewHostMsg_PageHasOSDD_Type)
376
377// Find out if the given url's security origin is installed as a search
378// provider.
379IPC_SYNC_MESSAGE_ROUTED2_1(
380 ViewHostMsg_GetSearchProviderInstallState,
381 GURL /* page url */,
382 GURL /* inquiry url */,
383 ViewHostMsg_GetSearchProviderInstallState_Params /* install */)
384
[email protected]d5a04832011-03-12 21:46:26385// Stores new inspector setting in the profile.
386IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
387 std::string, /* key */
388 std::string /* value */)
389
[email protected]d5a04832011-03-12 21:46:26390// Send back a string to be recorded by UserMetrics.
391IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
392 std::string /* action */)
393
394// Send back histograms as vector of pickled-histogram strings.
395IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererHistograms,
396 int, /* sequence number of Renderer Histograms. */
397 std::vector<std::string>)
398
399#if defined USE_TCMALLOC
400// Send back tcmalloc stats output.
401IPC_MESSAGE_CONTROL2(ViewHostMsg_RendererTcmalloc,
402 int /* pid */,
403 std::string /* tcmalloc debug output */)
404#endif
405
406// Sends back stats about the V8 heap.
407IPC_MESSAGE_CONTROL2(ViewHostMsg_V8HeapStats,
408 int /* size of heap (allocated from the OS) */,
409 int /* bytes in use */)
410
411// Request for a DNS prefetch of the names in the array.
412// NameList is typedef'ed std::vector<std::string>
413IPC_MESSAGE_CONTROL1(ViewHostMsg_DnsPrefetch,
414 std::vector<std::string> /* hostnames */)
415
416// Notifies when default plugin updates status of the missing plugin.
417IPC_MESSAGE_ROUTED1(ViewHostMsg_MissingPluginStatus,
418 int /* status */)
419
[email protected]d5a04832011-03-12 21:46:26420// Notifies when a plugin couldn't be loaded because it's outdated.
421IPC_MESSAGE_ROUTED2(ViewHostMsg_BlockedOutdatedPlugin,
422 string16, /* name */
423 GURL /* update_url */)
424
425// Displays a JavaScript out-of-memory message in the infobar.
426IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory)
427
[email protected]d5a04832011-03-12 21:46:26428IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
429 std::vector<GURL> /* all savable resource links */,
430 std::vector<GURL> /* all referrers of resource links */,
431 std::vector<GURL> /* all frame links */)
432
433IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
434 GURL /* frame's url */,
435 std::string /* data buffer */,
436 int32 /* complete status */)
437
[email protected]d8e74e82011-03-15 19:38:48438IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavicon,
[email protected]d5a04832011-03-12 21:46:26439 int /* Identifier of the request */,
440 GURL /* URL of the image */,
441 bool /* true if there was a network error */,
442 SkBitmap /* image_data */)
443
[email protected]d5a04832011-03-12 21:46:26444// Provide the browser process with information about the WebCore resource
445// cache.
446IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
447 WebKit::WebCache::ResourceTypeStats)
448
[email protected]d5a04832011-03-12 21:46:26449// Message sent from renderer to the browser to update the state of a command.
450// The |command| parameter is a RenderViewCommand. The |checked_state| parameter
451// is a CommandCheckedState.
452IPC_MESSAGE_ROUTED3(ViewHostMsg_CommandStateChanged,
453 int /* command */,
454 bool /* is_enabled */,
455 int /* checked_state */)
456
[email protected]d5a04832011-03-12 21:46:26457
458// Notifies the browser of the language (ISO 639_1 code language, such as fr,
459// en, zh...) of the current page.
460IPC_MESSAGE_ROUTED1(ViewHostMsg_PageLanguageDetermined,
461 std::string /* the language */)
462
463// Notifies the browser that a page has been translated.
464IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated,
465 int, /* page id */
466 std::string /* the original language */,
467 std::string /* the translated language */,
468 TranslateErrors::Type /* the error type if available */)
469
[email protected]d5a04832011-03-12 21:46:26470// Suggest results -----------------------------------------------------------
471
472IPC_MESSAGE_ROUTED3(ViewHostMsg_SetSuggestions,
473 int32 /* page_id */,
474 std::vector<std::string> /* suggestions */,
475 InstantCompleteBehavior)
476
477IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined,
478 int32 /* page_id */,
479 bool /* result */)
480
[email protected]d5a04832011-03-12 21:46:26481// Updates the content restrictions, i.e. to disable print/copy.
482IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions,
483 int /* restrictions */)
484
485// The currently displayed PDF has an unsupported feature.
486IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature)
487
488// JavaScript related messages -----------------------------------------------
489
490// Notify the JavaScript engine in the render to change its parameters
491// while performing stress testing.
492IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
493 int /* cmd */,
494 int /* param */)
495
496// Register a new handler for URL requests with the given scheme.
497IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
498 std::string /* scheme */,
499 GURL /* url */,
500 string16 /* title */)