Removing flow to demote App Launcher to App Host, so app_host.exe can be deleted...
[chromium-blink-merge.git] / chrome / common / render_messages.h
blobdbafae545e4afd0bcd0d88780407ab051f5feef4
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Multiply-included file, no traditional include guard.
6 #include <map>
7 #include <set>
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "base/file_path.h"
13 #include "base/process.h"
14 #include "base/shared_memory.h"
15 #include "base/string16.h"
16 #include "base/stringprintf.h"
17 #include "base/values.h"
18 #include "build/build_config.h"
19 #include "chrome/common/common_param_traits.h"
20 #include "chrome/common/content_settings.h"
21 #include "chrome/common/content_settings_pattern.h"
22 #include "chrome/common/instant_types.h"
23 #include "chrome/common/nacl_types.h"
24 #include "chrome/common/search_provider.h"
25 #include "chrome/common/search_types.h"
26 #include "chrome/common/translate_errors.h"
27 #include "content/public/common/common_param_traits.h"
28 #include "ipc/ipc_channel_handle.h"
29 #include "ipc/ipc_message_macros.h"
30 #include "ipc/ipc_platform_file.h"
31 #include "third_party/skia/include/core/SkBitmap.h"
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
34 #include "ui/gfx/rect.h"
36 // Singly-included section for enums and custom IPC traits.
37 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
38 #define CHROME_COMMON_RENDER_MESSAGES_H_
40 class SkBitmap;
42 // Command values for the cmd parameter of the
43 // ViewHost_JavaScriptStressTestControl message. For each command the parameter
44 // passed has a different meaning:
45 // For the command kJavaScriptStressTestSetStressRunType the parameter it the
46 // type taken from the enumeration v8::Testing::StressType.
47 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the
48 // number of the stress run about to take place.
49 enum ViewHostMsg_JavaScriptStressTestControl_Commands {
50 kJavaScriptStressTestSetStressRunType = 0,
51 kJavaScriptStressTestPrepareStressRun = 1,
54 // This enum is inside a struct so that we can forward-declare the struct in
55 // others headers without having to include this one.
56 struct ChromeViewHostMsg_GetPluginInfo_Status {
57 enum Value {
58 kAllowed,
59 kBlocked,
60 kClickToPlay,
61 kDisabled,
62 kNotFound,
63 kNPAPINotSupported,
64 kOutdatedBlocked,
65 kOutdatedDisallowed,
66 kUnauthorized,
69 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {}
71 Value value;
74 namespace IPC {
76 #if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
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.
81 // TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow.
82 template <>
83 struct ParamTraits<gfx::NativeView> {
84 typedef gfx::NativeView param_type;
85 static void Write(Message* m, const param_type& p) {
86 NOTIMPLEMENTED();
89 static bool Read(const Message* m, PickleIterator* iter, param_type* p) {
90 NOTIMPLEMENTED();
91 *p = NULL;
92 return true;
95 static void Log(const param_type& p, std::string* l) {
96 l->append(base::StringPrintf("<gfx::NativeView>"));
100 #endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
102 template <>
103 struct ParamTraits<ContentSettingsPattern> {
104 typedef ContentSettingsPattern param_type;
105 static void Write(Message* m, const param_type& p);
106 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
107 static void Log(const param_type& p, std::string* l);
110 } // namespace IPC
112 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
114 #define IPC_MESSAGE_START ChromeMsgStart
116 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value)
117 IPC_ENUM_TRAITS(InstantCompleteBehavior)
118 IPC_ENUM_TRAITS(InstantSizeUnits)
119 IPC_ENUM_TRAITS(InstantSuggestionType)
120 IPC_ENUM_TRAITS(InstantShownReason)
121 IPC_ENUM_TRAITS(search_provider::OSDDType)
122 IPC_ENUM_TRAITS(search_provider::InstallState)
123 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment)
124 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling)
125 IPC_ENUM_TRAITS(TranslateErrors::Type)
126 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
128 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status)
129 IPC_STRUCT_TRAITS_MEMBER(value)
130 IPC_STRUCT_TRAITS_END()
132 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
133 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output)
134 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status)
135 IPC_STRUCT_MEMBER(webkit::WebPluginInfo, plugin)
136 IPC_STRUCT_MEMBER(std::string, actual_mime_type)
137 IPC_STRUCT_MEMBER(std::string, group_identifier)
138 IPC_STRUCT_MEMBER(string16, group_name)
139 IPC_STRUCT_END()
141 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts)
142 IPC_STRUCT_TRAITS_MEMBER(scheme)
143 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard)
144 IPC_STRUCT_TRAITS_MEMBER(host)
145 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard)
146 IPC_STRUCT_TRAITS_MEMBER(port)
147 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard)
148 IPC_STRUCT_TRAITS_MEMBER(path)
149 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard)
150 IPC_STRUCT_TRAITS_END()
152 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
153 IPC_STRUCT_TRAITS_MEMBER(primary_pattern)
154 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern)
155 IPC_STRUCT_TRAITS_MEMBER(setting)
156 IPC_STRUCT_TRAITS_MEMBER(source)
157 IPC_STRUCT_TRAITS_MEMBER(incognito)
158 IPC_STRUCT_TRAITS_END()
160 IPC_STRUCT_TRAITS_BEGIN(InstantAutocompleteResult)
161 IPC_STRUCT_TRAITS_MEMBER(provider)
162 IPC_STRUCT_TRAITS_MEMBER(type)
163 IPC_STRUCT_TRAITS_MEMBER(description)
164 IPC_STRUCT_TRAITS_MEMBER(destination_url)
165 IPC_STRUCT_TRAITS_MEMBER(relevance)
166 IPC_STRUCT_TRAITS_END()
168 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion)
169 IPC_STRUCT_TRAITS_MEMBER(text)
170 IPC_STRUCT_TRAITS_MEMBER(behavior)
171 IPC_STRUCT_TRAITS_MEMBER(type)
172 IPC_STRUCT_TRAITS_END()
174 IPC_ENUM_TRAITS(chrome::search::Mode::Type)
175 IPC_ENUM_TRAITS(chrome::search::Mode::Origin)
176 IPC_STRUCT_TRAITS_BEGIN(chrome::search::Mode)
177 IPC_STRUCT_TRAITS_MEMBER(mode)
178 IPC_STRUCT_TRAITS_MEMBER(origin)
179 IPC_STRUCT_TRAITS_END()
181 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
182 IPC_STRUCT_TRAITS_MEMBER(image_rules)
183 IPC_STRUCT_TRAITS_MEMBER(script_rules)
184 IPC_STRUCT_TRAITS_END()
186 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo)
187 IPC_STRUCT_TRAITS_MEMBER(color_r)
188 IPC_STRUCT_TRAITS_MEMBER(color_g)
189 IPC_STRUCT_TRAITS_MEMBER(color_b)
190 IPC_STRUCT_TRAITS_MEMBER(color_a)
191 IPC_STRUCT_TRAITS_MEMBER(theme_id)
192 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment)
193 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment)
194 IPC_STRUCT_TRAITS_MEMBER(image_tiling)
195 IPC_STRUCT_TRAITS_MEMBER(image_height)
196 IPC_STRUCT_TRAITS_END()
198 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
199 IPC_STRUCT_TRAITS_MEMBER(count)
200 IPC_STRUCT_TRAITS_MEMBER(size)
201 IPC_STRUCT_TRAITS_MEMBER(liveSize)
202 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
203 IPC_STRUCT_TRAITS_END()
205 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
206 IPC_STRUCT_TRAITS_MEMBER(images)
207 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
208 IPC_STRUCT_TRAITS_MEMBER(scripts)
209 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
210 IPC_STRUCT_TRAITS_MEMBER(fonts)
211 IPC_STRUCT_TRAITS_END()
213 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
214 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
215 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
216 IPC_STRUCT_TRAITS_MEMBER(capacity)
217 IPC_STRUCT_TRAITS_MEMBER(liveSize)
218 IPC_STRUCT_TRAITS_MEMBER(deadSize)
219 IPC_STRUCT_TRAITS_END()
221 //-----------------------------------------------------------------------------
222 // RenderView messages
223 // These are messages sent from the browser to the renderer process.
225 // Tells the renderer to set its maximum cache size to the supplied value.
226 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities,
227 size_t /* min_dead_capacity */,
228 size_t /* max_dead_capacity */,
229 size_t /* capacity */)
231 // Tells the renderer to clear the cache.
232 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache,
233 bool /* on_navigation */)
235 // Tells the renderer to dump as much memory as it can, perhaps because we
236 // have memory pressure or the renderer is (or will be) paged out. This
237 // should only result in purging objects we can recalculate, e.g. caches or
238 // JS garbage, not in purging irreplaceable objects.
239 IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory)
241 // For WebUI testing, this message stores parameters to do ScriptEvalRequest at
242 // a time which is late enough to not be thrown out, and early enough to be
243 // before onload events are fired.
244 IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript,
245 string16, /* frame_xpath */
246 string16, /* jscript_url */
247 int, /* ID */
248 bool /* If true, result is sent back. */)
250 // Tells the render view to capture a thumbnail image of the page. The
251 // render view responds with a ChromeViewHostMsg_Snapshot.
252 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CaptureSnapshot)
254 // History system notification that the visited link database has been
255 // replaced. It has one SharedMemoryHandle argument consisting of the table
256 // handle. This handle is valid in the context of the renderer
257 IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_NewTable,
258 base::SharedMemoryHandle)
260 // History system notification that a link has been added and the link
261 // coloring state for the given hash must be re-calculated.
262 IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_Add, std::vector<uint64>)
264 // History system notification that one or more history items have been
265 // deleted, which at this point means that all link coloring state must be
266 // re-calculated.
267 IPC_MESSAGE_CONTROL0(ChromeViewMsg_VisitedLink_Reset)
269 // Set the content setting rules stored by the renderer.
270 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
271 RendererContentSettingRules /* rules */)
273 // Tells the render view to load all blocked plugins with the given identifier.
274 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins,
275 std::string /* identifier */)
277 // Asks the renderer to send back stats on the WebCore cache broken down by
278 // resource types.
279 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats)
281 // Tells the renderer to create a FieldTrial, and by using a 100% probability
282 // for the FieldTrial, forces the FieldTrial to have assigned group name.
283 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup,
284 std::string /* field trial name */,
285 std::string /* group name that was assigned. */)
287 // Asks the renderer to send back V8 heap stats.
288 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats)
290 // Posts a message to the renderer.
291 IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost,
292 std::string /* The message */,
293 std::string /* The origin */,
294 std::string /* The target*/)
296 IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange,
297 string16 /* value */,
298 bool /* verbatim */,
299 size_t /* selection_start */,
300 size_t /* selection_end */)
302 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit,
303 string16 /* value */)
305 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel,
306 string16 /* value */)
308 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPopupResize,
309 gfx::Rect /* bounds */)
311 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange,
312 int /* start */,
313 int /* end */)
315 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant)
317 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxAutocompleteResults,
318 std::vector<InstantAutocompleteResult>
319 /* native_suggestions */)
321 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxUpOrDownKeyPressed,
322 int /* count */)
324 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxModeChanged,
325 chrome::search::Mode /* mode */)
327 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults,
328 bool /* display_instant_results */)
330 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged,
331 ThemeBackgroundInfo /* value */)
333 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeAreaHeightChanged,
334 int /* height */)
336 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxKeyCaptureChanged,
337 bool /* is_key_capture_enabled */)
339 // Toggles visual muting of the render view area. This is on when a constrained
340 // window is showing.
341 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
342 bool /* deemphazied */)
344 // Tells the renderer to translate the page contents from one language to
345 // another.
346 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage,
347 int /* page id */,
348 std::string, /* the script injected in the page */
349 std::string, /* BCP 47/RFC 5646 language code the page
350 is in */
351 std::string /* BCP 47/RFC 5646 language code to translate
352 to */)
354 // Tells the renderer to revert the text of translated page to its original
355 // contents.
356 IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation,
357 int /* page id */)
359 // Sent on process startup to indicate whether this process is running in
360 // incognito mode.
361 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
362 bool /* is_incognito_processs */)
364 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
365 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent,
366 bool /* allowed */)
368 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
369 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent,
370 bool /* allowed */)
372 // Tells renderer to always enforce mixed content blocking for this host.
373 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost,
374 std::string /* host */)
376 // Sent when the profile changes the kSafeBrowsingEnabled preference.
377 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
378 bool /* enable_phishing_detection */)
380 // This message asks frame sniffer start.
381 IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer,
382 string16 /* frame-name */)
384 // JavaScript related messages -----------------------------------------------
386 // Notify the JavaScript engine in the render to change its parameters
387 // while performing stress testing.
388 IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
389 int /* cmd */,
390 int /* param */)
392 // Asks the renderer to send back FPS.
393 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS)
395 // Tells the view it is displaying an interstitial page.
396 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial)
398 // Tells the renderer to suspend/resume the webkit timers.
399 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ToggleWebKitSharedTimer,
400 bool /* suspend */)
402 //-----------------------------------------------------------------------------
403 // Misc messages
404 // These are messages sent from the renderer to the browser process.
406 // Provides the contents for the given page that was loaded recently.
407 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageContents,
408 GURL /* URL of the page */,
409 int32 /* page id */,
410 string16 /* page contents */)
412 // Notification that the language for the tab has been determined.
413 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined,
414 std::string /* page ISO639_1 language code */,
415 bool /* whether the page can be translated */)
417 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats,
418 WebKit::WebCache::UsageStats /* stats */)
420 // Tells the browser that content in the current page was blocked due to the
421 // user's content settings.
422 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked,
423 ContentSettingsType, /* type of blocked content */
424 std::string /* resource identifier */)
426 // Sent by the renderer process to check whether access to web databases is
427 // granted by content settings.
428 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase,
429 int /* render_view_id */,
430 GURL /* origin_url */,
431 GURL /* top origin url */,
432 string16 /* database name */,
433 string16 /* database display name */,
434 bool /* allowed */)
436 // Sent by the renderer process to check whether access to DOM Storage is
437 // granted by content settings.
438 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage,
439 int /* render_view_id */,
440 GURL /* origin_url */,
441 GURL /* top origin url */,
442 bool /* if true local storage, otherwise session */,
443 bool /* allowed */)
445 // Sent by the renderer process to check whether access to FileSystem is
446 // granted by content settings.
447 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem,
448 int /* render_view_id */,
449 GURL /* origin_url */,
450 GURL /* top origin url */,
451 bool /* allowed */)
453 // Sent by the renderer process to check whether access to Indexed DBis
454 // granted by content settings.
455 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB,
456 int /* render_view_id */,
457 GURL /* origin_url */,
458 GURL /* top origin url */,
459 string16 /* database name */,
460 bool /* allowed */)
462 // Return information about a plugin for the given URL and MIME type.
463 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
464 // about specific reasons why a plug-in can't be used, for example because it's
465 // disabled.
466 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo,
467 int /* render_view_id */,
468 GURL /* url */,
469 GURL /* top origin url */,
470 std::string /* mime_type */,
471 ChromeViewHostMsg_GetPluginInfo_Output /* output */)
473 #if defined(ENABLE_PLUGIN_INSTALLATION)
474 // Tells the browser to search for a plug-in that can handle the given MIME
475 // type. The result will be sent asynchronously to the routing ID
476 // |placeholder_id|.
477 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin,
478 int /* placeholder_id */,
479 std::string /* mime_type */)
481 // Notifies the browser that a missing plug-in placeholder has been removed, so
482 // the corresponding PluginPlaceholderHost can be deleted.
483 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost,
484 int /* placeholder_id */)
486 // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
487 // has been found.
488 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin,
489 string16 /* plugin_name */)
491 // Notifies a missing plug-in placeholder that no plug-in has been found.
492 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin)
494 // Notifies a missing plug-in placeholder that we have started downloading
495 // the plug-in.
496 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin)
498 // Notifies a missing plug-in placeholder that we have finished downloading
499 // the plug-in.
500 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin)
502 // Notifies a missing plug-in placeholder that there was an error downloading
503 // the plug-in.
504 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin,
505 std::string /* message */)
506 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
508 // Notifies a missing plug-in placeholder that the user cancelled downloading
509 // the plug-in.
510 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin)
512 // Tells the browser to open chrome://plugins in a new tab. We use a separate
513 // message because renderer processes aren't allowed to directly navigate to
514 // chrome:// URLs.
515 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins)
517 // Tells the browser that there was an error loading a plug-in.
518 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin,
519 FilePath /* plugin_path */)
521 // Tells the browser that we blocked a plug-in because NPAPI is not supported.
522 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported,
523 std::string /* identifer */)
525 // Send a snapshot of the tab contents to the render host.
526 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot,
527 SkBitmap /* bitmap */)
529 // A message for an external host.
530 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost,
531 std::string /* message */,
532 std::string /* origin */,
533 std::string /* target */)
535 // A renderer sends this to the browser process when it wants to start
536 // a new instance of the Native Client process. The browser will launch
537 // the process and return an IPC channel handle. This handle will only
538 // be valid if the NaCl IPC proxy is enabled.
539 IPC_SYNC_MESSAGE_CONTROL4_3(ChromeViewHostMsg_LaunchNaCl,
540 GURL /* manifest_url */,
541 int /* render_view_id */,
542 uint32 /* permission_bits */,
543 int /* socket count */,
544 std::vector<nacl::FileDescriptor>
545 /* imc channel handles */,
546 IPC::ChannelHandle /* ipc_channel_handle */,
547 int /* plugin_child_id */)
549 // A renderer sends this to the browser process when it wants to
550 // open a file for from the Pnacl component directory.
551 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetReadonlyPnaclFD,
552 std::string /* name of requested PNaCl file */,
553 IPC::PlatformFileForTransit /* output file */)
555 // A renderer sends this to the browser process when it wants to
556 // create a temporary file.
557 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_NaClCreateTemporaryFile,
558 IPC::PlatformFileForTransit /* out file */)
560 // Notification that the page has an OpenSearch description document
561 // associated with it.
562 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD,
563 int32 /* page_id */,
564 GURL /* url of OS description document */,
565 search_provider::OSDDType)
567 // Find out if the given url's security origin is installed as a search
568 // provider.
569 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState,
570 GURL /* page url */,
571 GURL /* inquiry url */,
572 search_provider::InstallState /* install */)
574 // Send back histograms as vector of pickled-histogram strings.
575 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RendererHistograms,
576 int, /* sequence number of Renderer Histograms. */
577 std::vector<std::string>)
579 // Sends back stats about the V8 heap.
580 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats,
581 int /* size of heap (allocated from the OS) */,
582 int /* bytes in use */)
584 // Request for a DNS prefetch of the names in the array.
585 // NameList is typedef'ed std::vector<std::string>
586 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch,
587 std::vector<std::string> /* hostnames */)
589 // Notifies when a plugin couldn't be loaded because it's outdated.
590 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin,
591 int /* placeholder ID */,
592 std::string /* plug-in group identifier */)
594 // Notifies when a plugin couldn't be loaded because it requires
595 // user authorization.
596 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin,
597 string16 /* name */,
598 std::string /* plug-in group identifier */)
600 // Provide the browser process with information about the WebCore resource
601 // cache and current renderer framerate.
602 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats,
603 WebKit::WebCache::ResourceTypeStats)
606 // Notifies the browser of the language (ISO 639_1 code language, such as fr,
607 // en, zh...) of the current page.
608 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PageLanguageDetermined,
609 std::string /* the language */)
611 // Notifies the browser that a page has been translated.
612 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated,
613 int, /* page id */
614 std::string /* the original language */,
615 std::string /* the translated language */,
616 TranslateErrors::Type /* the error type if available */)
618 // Message sent from the renderer to the browser to notify it of events which
619 // may lead to the cancellation of a prerender. The message is sent only when
620 // the renderer is prerendering.
621 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media)
623 // Message sent from the renderer to the browser to notify it of a
624 // window.print() call which should cancel the prerender. The message is sent
625 // only when the renderer is prerendering.
626 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
628 // Sent by the renderer to check if a URL has permission to trigger a clipboard
629 // read/write operation from the DOM.
630 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
631 GURL /* origin */,
632 bool /* allowed */)
633 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
634 GURL /* origin */,
635 bool /* allowed */)
637 // Sent when the renderer was prevented from displaying insecure content in
638 // a secure page by a security policy. The page may appear incomplete.
639 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
641 // Sent when the renderer was prevented from running insecure content in
642 // a secure origin by a security policy. The page may appear incomplete.
643 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
645 // Message sent from renderer to the browser when the element that is focused
646 // and currently accepts keyboard input inside the webpage has been touched.
647 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FocusedEditableNodeTouched)
649 // Suggest results -----------------------------------------------------------
651 // Sent by the Instant preview to populate the omnibox with query suggestions.
652 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetSuggestions,
653 int /* page_id */,
654 std::vector<InstantSuggestion> /* suggestions */)
656 // Sent by the Instant preview indicating whether the page supports the Instant
657 // API or not (http://dev.chromium.org/searchbox).
658 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
659 int /* page_id */,
660 bool /* result */)
662 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SearchBoxNavigate,
663 int /* page_id */,
664 GURL /* destination */,
665 content::PageTransition /* transition */)
667 // Sent by the Instant preview asking to show itself with the given height.
668 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_ShowInstantPreview,
669 int /* page_id */,
670 InstantShownReason /* reason */,
671 int /* height */,
672 InstantSizeUnits /* units */)
674 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StartCapturingKeyStrokes,
675 int /* page_id */)
677 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StopCapturingKeyStrokes,
678 int /* page_id */)
680 // The currently displayed PDF has an unsupported feature.
681 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
683 // This message indicates the error appeared in the frame.
684 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError,
685 int /* error */)
687 // This message indicates the monitored frame loading had completed.
688 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted)
690 // The following messages are used to set and get cookies for ChromeFrame
691 // processes.
692 // Used to set a cookie. The cookie is set asynchronously, but will be
693 // available to a subsequent ChromeViewHostMsg_GetCookies request.
694 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie,
695 GURL /* url */,
696 GURL /* first_party_for_cookies */,
697 std::string /* cookie */)
699 // Used to get cookies for the given URL. This may block waiting for a
700 // previous SetCookie message to be processed.
701 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
702 GURL /* url */,
703 GURL /* first_party_for_cookies */,
704 std::string /* cookies */)
706 // Provide the browser process with current renderer framerate.
707 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
708 int /* routing id */,
709 float /* frames per second */)