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.
11 #include "base/basictypes.h"
12 #include "base/files/file_path.h"
13 #include "base/memory/shared_memory.h"
14 #include "base/process/process.h"
15 #include "base/strings/string16.h"
16 #include "base/strings/stringprintf.h"
17 #include "base/values.h"
18 #include "build/build_config.h"
19 #include "chrome/common/autocomplete_match_type.h"
20 #include "chrome/common/common_param_traits.h"
21 #include "chrome/common/content_settings.h"
22 #include "chrome/common/content_settings_pattern.h"
23 #include "chrome/common/instant_types.h"
24 #include "chrome/common/ntp_logging_events.h"
25 #include "chrome/common/omnibox_focus_state.h"
26 #include "chrome/common/search_provider.h"
27 #include "components/nacl/common/nacl_types.h"
28 #include "components/translate/core/common/language_detection_details.h"
29 #include "components/translate/core/common/translate_errors.h"
30 #include "content/public/common/common_param_traits.h"
31 #include "content/public/common/referrer.h"
32 #include "content/public/common/top_controls_state.h"
33 #include "extensions/common/stack_frame.h"
34 #include "ipc/ipc_channel_handle.h"
35 #include "ipc/ipc_message_macros.h"
36 #include "ipc/ipc_platform_file.h"
37 #include "third_party/skia/include/core/SkBitmap.h"
38 #include "third_party/WebKit/public/web/WebCache.h"
39 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
40 #include "ui/base/window_open_disposition.h"
41 #include "ui/gfx/rect.h"
43 // Singly-included section for enums and custom IPC traits.
44 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
45 #define CHROME_COMMON_RENDER_MESSAGES_H_
49 // Command values for the cmd parameter of the
50 // ViewHost_JavaScriptStressTestControl message. For each command the parameter
51 // passed has a different meaning:
52 // For the command kJavaScriptStressTestSetStressRunType the parameter it the
53 // type taken from the enumeration v8::Testing::StressType.
54 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the
55 // number of the stress run about to take place.
56 enum ViewHostMsg_JavaScriptStressTestControl_Commands
{
57 kJavaScriptStressTestSetStressRunType
= 0,
58 kJavaScriptStressTestPrepareStressRun
= 1,
61 // This enum is inside a struct so that we can forward-declare the struct in
62 // others headers without having to include this one.
63 struct ChromeViewHostMsg_GetPluginInfo_Status
{
77 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed
) {}
84 #if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
86 // TODO(port): this shouldn't exist. However, the plugin stuff is really using
87 // HWNDS (NativeView), and making Windows calls based on them. I've not figured
88 // out the deal with plugins yet.
89 // TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow.
91 struct ParamTraits
<gfx::NativeView
> {
92 typedef gfx::NativeView param_type
;
93 static void Write(Message
* m
, const param_type
& p
) {
97 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* p
) {
103 static void Log(const param_type
& p
, std::string
* l
) {
104 l
->append(base::StringPrintf("<gfx::NativeView>"));
108 #endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
111 struct ParamTraits
<ContentSettingsPattern
> {
112 typedef ContentSettingsPattern param_type
;
113 static void Write(Message
* m
, const param_type
& p
);
114 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
115 static void Log(const param_type
& p
, std::string
* l
);
120 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
122 #define IPC_MESSAGE_START ChromeMsgStart
124 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status::Value
,
125 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized
)
126 IPC_ENUM_TRAITS(OmniboxFocusChangeReason
)
127 IPC_ENUM_TRAITS(OmniboxFocusState
)
128 IPC_ENUM_TRAITS(search_provider::OSDDType
)
129 IPC_ENUM_TRAITS(search_provider::InstallState
)
130 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment
)
131 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling
)
132 IPC_ENUM_TRAITS(TranslateErrors::Type
)
133 IPC_ENUM_TRAITS(blink::WebConsoleMessage::Level
)
134 IPC_ENUM_TRAITS(content::TopControlsState
)
136 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status
)
137 IPC_STRUCT_TRAITS_MEMBER(value
)
138 IPC_STRUCT_TRAITS_END()
140 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
141 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output
)
142 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status
, status
)
143 IPC_STRUCT_MEMBER(content::WebPluginInfo
, plugin
)
144 IPC_STRUCT_MEMBER(std::string
, actual_mime_type
)
145 IPC_STRUCT_MEMBER(std::string
, group_identifier
)
146 IPC_STRUCT_MEMBER(base::string16
, group_name
)
149 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts
)
150 IPC_STRUCT_TRAITS_MEMBER(scheme
)
151 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard
)
152 IPC_STRUCT_TRAITS_MEMBER(host
)
153 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard
)
154 IPC_STRUCT_TRAITS_MEMBER(port
)
155 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard
)
156 IPC_STRUCT_TRAITS_MEMBER(path
)
157 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard
)
158 IPC_STRUCT_TRAITS_END()
160 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource
)
161 IPC_STRUCT_TRAITS_MEMBER(primary_pattern
)
162 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern
)
163 IPC_STRUCT_TRAITS_MEMBER(setting
)
164 IPC_STRUCT_TRAITS_MEMBER(source
)
165 IPC_STRUCT_TRAITS_MEMBER(incognito
)
166 IPC_STRUCT_TRAITS_END()
168 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion
)
169 IPC_STRUCT_TRAITS_MEMBER(text
)
170 IPC_STRUCT_TRAITS_MEMBER(metadata
)
171 IPC_STRUCT_TRAITS_END()
173 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem
)
174 IPC_STRUCT_TRAITS_MEMBER(url
)
175 IPC_STRUCT_TRAITS_MEMBER(title
)
176 IPC_STRUCT_TRAITS_END()
178 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules
)
179 IPC_STRUCT_TRAITS_MEMBER(image_rules
)
180 IPC_STRUCT_TRAITS_MEMBER(script_rules
)
181 IPC_STRUCT_TRAITS_END()
183 IPC_STRUCT_TRAITS_BEGIN(RGBAColor
)
184 IPC_STRUCT_TRAITS_MEMBER(r
)
185 IPC_STRUCT_TRAITS_MEMBER(g
)
186 IPC_STRUCT_TRAITS_MEMBER(b
)
187 IPC_STRUCT_TRAITS_MEMBER(a
)
188 IPC_STRUCT_TRAITS_END()
190 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo
)
191 IPC_STRUCT_TRAITS_MEMBER(using_default_theme
)
192 IPC_STRUCT_TRAITS_MEMBER(background_color
)
193 IPC_STRUCT_TRAITS_MEMBER(text_color
)
194 IPC_STRUCT_TRAITS_MEMBER(link_color
)
195 IPC_STRUCT_TRAITS_MEMBER(text_color_light
)
196 IPC_STRUCT_TRAITS_MEMBER(header_color
)
197 IPC_STRUCT_TRAITS_MEMBER(section_border_color
)
198 IPC_STRUCT_TRAITS_MEMBER(theme_id
)
199 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment
)
200 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment
)
201 IPC_STRUCT_TRAITS_MEMBER(image_tiling
)
202 IPC_STRUCT_TRAITS_MEMBER(image_height
)
203 IPC_STRUCT_TRAITS_MEMBER(has_attribution
)
204 IPC_STRUCT_TRAITS_MEMBER(logo_alternate
)
205 IPC_STRUCT_TRAITS_END()
207 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStat
)
208 IPC_STRUCT_TRAITS_MEMBER(count
)
209 IPC_STRUCT_TRAITS_MEMBER(size
)
210 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
211 IPC_STRUCT_TRAITS_MEMBER(decodedSize
)
212 IPC_STRUCT_TRAITS_END()
214 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStats
)
215 IPC_STRUCT_TRAITS_MEMBER(images
)
216 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets
)
217 IPC_STRUCT_TRAITS_MEMBER(scripts
)
218 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets
)
219 IPC_STRUCT_TRAITS_MEMBER(fonts
)
220 IPC_STRUCT_TRAITS_END()
222 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats
)
223 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity
)
224 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity
)
225 IPC_STRUCT_TRAITS_MEMBER(capacity
)
226 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
227 IPC_STRUCT_TRAITS_MEMBER(deadSize
)
228 IPC_STRUCT_TRAITS_END()
230 IPC_STRUCT_TRAITS_BEGIN(LanguageDetectionDetails
)
231 IPC_STRUCT_TRAITS_MEMBER(time
)
232 IPC_STRUCT_TRAITS_MEMBER(url
)
233 IPC_STRUCT_TRAITS_MEMBER(content_language
)
234 IPC_STRUCT_TRAITS_MEMBER(cld_language
)
235 IPC_STRUCT_TRAITS_MEMBER(is_cld_reliable
)
236 IPC_STRUCT_TRAITS_MEMBER(html_root_language
)
237 IPC_STRUCT_TRAITS_MEMBER(adopted_language
)
238 IPC_STRUCT_TRAITS_MEMBER(contents
)
239 IPC_STRUCT_TRAITS_END()
241 IPC_STRUCT_TRAITS_BEGIN(extensions::StackFrame
)
242 IPC_STRUCT_TRAITS_MEMBER(line_number
)
243 IPC_STRUCT_TRAITS_MEMBER(column_number
)
244 IPC_STRUCT_TRAITS_MEMBER(source
)
245 IPC_STRUCT_TRAITS_MEMBER(function
)
246 IPC_STRUCT_TRAITS_END()
248 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType
,
251 //-----------------------------------------------------------------------------
252 // RenderView messages
253 // These are messages sent from the browser to the renderer process.
255 // Tells the renderer to set its maximum cache size to the supplied value.
256 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities
,
257 size_t /* min_dead_capacity */,
258 size_t /* max_dead_capacity */,
259 size_t /* capacity */)
261 // Tells the renderer to clear the cache.
262 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache
,
263 bool /* on_navigation */)
265 // Tells the renderer to dump as much memory as it can, perhaps because we
266 // have memory pressure or the renderer is (or will be) paged out. This
267 // should only result in purging objects we can recalculate, e.g. caches or
268 // JS garbage, not in purging irreplaceable objects.
269 IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory
)
271 // For WebUI testing, this message stores parameters to do ScriptEvalRequest at
272 // a time which is late enough to not be thrown out, and early enough to be
273 // before onload events are fired.
274 IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript
,
275 base::string16
, /* frame_xpath */
276 base::string16
, /* jscript_url */
278 bool /* If true, result is sent back. */)
280 // Set the content setting rules stored by the renderer.
281 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules
,
282 RendererContentSettingRules
/* rules */)
284 // Tells the render frame to load all blocked plugins with the given identifier.
285 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins
,
286 std::string
/* identifier */)
288 // Asks the renderer to send back stats on the WebCore cache broken down by
290 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats
)
292 // Tells the renderer to create a FieldTrial, and by using a 100% probability
293 // for the FieldTrial, forces the FieldTrial to have assigned group name.
294 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup
,
295 std::string
/* field trial name */,
296 std::string
/* group name that was assigned. */)
298 // Asks the renderer to send back V8 heap stats.
299 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats
)
301 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant
)
303 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults
,
304 bool /* display_instant_results */)
306 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged
,
307 OmniboxFocusState
/* new_focus_state */,
308 OmniboxFocusChangeReason
/* reason */)
310 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange
,
314 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged
,
315 std::vector
<InstantMostVisitedItem
> /* items */)
317 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation
,
318 bool /* is_app_launcher_enabled */)
320 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress
,
321 bool /* input_in_progress */)
323 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch
,
324 InstantSuggestion
/* suggestion */)
326 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit
,
327 base::string16
/* value */)
329 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged
,
330 ThemeBackgroundInfo
/* value */)
332 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult
,
333 base::string16
/* identity */,
334 bool /* identity_match */)
336 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch
)
338 // Toggles visual muting of the render view area. This is on when a constrained
339 // window is showing.
340 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized
,
341 bool /* deemphazied */)
343 // Tells the renderer to translate the page contents from one language to
345 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage
,
347 std::string
, /* the script injected in the page */
348 std::string
, /* BCP 47/RFC 5646 language code the page
350 std::string
/* BCP 47/RFC 5646 language code to translate
353 // Tells the renderer to revert the text of translated page to its original
355 IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation
,
358 // Sent on process startup to indicate whether this process is running in
360 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess
,
361 bool /* is_incognito_processs */)
363 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
364 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent
,
367 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
368 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent
,
371 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame
)
373 // Sent when the profile changes the kSafeBrowsingEnabled preference.
374 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection
,
375 bool /* enable_phishing_detection */)
377 // Asks the renderer for a thumbnail of the image selected by the most
378 // recently opened context menu, if there is one. If the image's area
379 // is greater than thumbnail_min_area it will be downscaled to
380 // be within thumbnail_max_size. The possibly downsampled image will be
381 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
382 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode
,
383 int /* thumbnail_min_area_pixels */,
384 gfx::Size
/* thumbnail_max_size_pixels */)
386 // Notifies the renderer whether hiding/showing the top controls is enabled,
387 // what the current state should be, and whether or not to animate to the
389 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState
,
390 content::TopControlsState
/* constraints */,
391 content::TopControlsState
/* current */,
395 // Updates the window features of the render view.
396 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures
,
397 blink::WebWindowFeatures
/* window_features */)
399 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK
,
400 SkBitmap
/* thumbnail */,
401 gfx::Size
/* original size of the image */)
403 #if defined(OS_ANDROID)
404 // Asks the renderer to return information about whether the current page can
405 // be treated as a webapp.
406 IPC_MESSAGE_ROUTED1(ChromeViewMsg_RetrieveWebappInformation
,
407 GURL
/* expected_url */)
408 #endif // defined(OS_ANDROID)
410 // chrome.principals messages ------------------------------------------------
412 // Message sent from the renderer to the browser to get the list of browser
413 // managed accounts for the given origin.
414 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts
,
415 GURL
/* current URL */,
416 std::vector
<std::string
> /* managed accounts */)
418 // Message sent from the renderer to the browser to show the browser account
420 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI
)
422 // JavaScript related messages -----------------------------------------------
424 // Notify the JavaScript engine in the render to change its parameters
425 // while performing stress testing.
426 IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl
,
430 // Asks the renderer to send back FPS.
431 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS
)
433 // Tells the frame it is displaying an interstitial page.
434 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial
)
436 // Provides the renderer with the results of the browser's investigation into
437 // why a recent main frame load failed (currently, just DNS probe result).
438 // NetErrorHelper will receive this mesage and replace or update the error
439 // page with more specific troubleshooting suggestions.
440 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo
,
441 int /* DNS probe status */)
443 // Sets the alternate error page URL (Link Doctor) for the renderer process.
444 // Handled by the NetErrorHelper.
445 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAltErrorPageURL
, GURL
)
447 //-----------------------------------------------------------------------------
449 // These are messages sent from the renderer to the browser process.
451 // Notification that the language for the tab has been determined.
452 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined
,
453 LanguageDetectionDetails
/* details about lang detection */,
454 bool /* whether the page needs translation */)
456 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats
,
457 blink::WebCache::UsageStats
/* stats */)
459 // Tells the browser that content in the current page was blocked due to the
460 // user's content settings.
461 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_ContentBlocked
,
462 ContentSettingsType
/* type of blocked content */)
464 // Sent by the renderer process to check whether access to web databases is
465 // granted by content settings.
466 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase
,
467 int /* render_frame_id */,
468 GURL
/* origin_url */,
469 GURL
/* top origin url */,
470 base::string16
/* database name */,
471 base::string16
/* database display name */,
474 // Sent by the renderer process to check whether access to DOM Storage is
475 // granted by content settings.
476 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage
,
477 int /* render_frame_id */,
478 GURL
/* origin_url */,
479 GURL
/* top origin url */,
480 bool /* if true local storage, otherwise session */,
483 // Sent by the renderer process to check whether access to FileSystem is
484 // granted by content settings.
485 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem
,
486 int /* render_frame_id */,
487 GURL
/* origin_url */,
488 GURL
/* top origin url */,
491 // Sent by the renderer process to check whether access to Indexed DBis
492 // granted by content settings.
493 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB
,
494 int /* render_frame_id */,
495 GURL
/* origin_url */,
496 GURL
/* top origin url */,
497 base::string16
/* database name */,
500 // Return information about a plugin for the given URL and MIME type.
501 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
502 // about specific reasons why a plug-in can't be used, for example because it's
504 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo
,
505 int /* render_frame_id */,
507 GURL
/* top origin url */,
508 std::string
/* mime_type */,
509 ChromeViewHostMsg_GetPluginInfo_Output
/* output */)
511 // Returns whether any internal plugin supporting |mime_type| is registered
512 // Does not determine whether the plugin can actually be instantiated
513 // (e.g. whether it is allowed or has all its dependencies).
514 // When the returned *|is_registered| is true, |additional_param_names| and
515 // |additional_param_values| contain the name-value pairs, if any, specified
516 // for the *first* plugin found that is registered for |mime_type|.
517 IPC_SYNC_MESSAGE_CONTROL1_3(
518 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType
,
519 std::string
/* mime_type */,
520 bool /* registered */,
521 std::vector
<base::string16
> /* additional_param_names */,
522 std::vector
<base::string16
> /* additional_param_values */)
524 #if defined(ENABLE_PLUGIN_INSTALLATION)
525 // Tells the browser to search for a plug-in that can handle the given MIME
526 // type. The result will be sent asynchronously to the routing ID
528 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin
,
529 int /* placeholder_id */,
530 std::string
/* mime_type */)
532 // Notifies the browser that a missing plug-in placeholder has been removed, so
533 // the corresponding PluginPlaceholderHost can be deleted.
534 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost
,
535 int /* placeholder_id */)
537 // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
539 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin
,
540 base::string16
/* plugin_name */)
542 // Notifies a missing plug-in placeholder that no plug-in has been found.
543 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin
)
545 // Notifies a missing plug-in placeholder that we have started downloading
547 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin
)
549 // Notifies a missing plug-in placeholder that we have finished downloading
551 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin
)
553 // Notifies a missing plug-in placeholder that there was an error downloading
555 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin
,
556 std::string
/* message */)
557 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
559 // Notifies a missing plug-in placeholder that the user cancelled downloading
561 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin
)
563 // Tells the browser to open chrome://plugins in a new tab. We use a separate
564 // message because renderer processes aren't allowed to directly navigate to
566 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins
)
568 // Tells the browser that there was an error loading a plug-in.
569 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin
,
570 base::FilePath
/* plugin_path */)
572 // Tells the browser that we blocked a plug-in because NPAPI is not supported.
573 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported
,
574 std::string
/* identifer */)
576 // Tells the renderer that the NPAPI cannot be used. For example Ash on windows.
577 IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported
)
579 // Notification that the page has an OpenSearch description document
580 // associated with it.
581 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD
,
583 GURL
/* url of OS description document */,
584 search_provider::OSDDType
)
586 // Find out if the given url's security origin is installed as a search
588 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState
,
590 GURL
/* inquiry url */,
591 search_provider::InstallState
/* install */)
593 // Sends back stats about the V8 heap.
594 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats
,
595 int /* size of heap (allocated from the OS) */,
596 int /* bytes in use */)
598 // Request for a DNS prefetch of the names in the array.
599 // NameList is typedef'ed std::vector<std::string>
600 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch
,
601 std::vector
<std::string
> /* hostnames */)
603 // Request for preconnect to host providing resource specified by URL
604 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_Preconnect
,
605 GURL
/* preconnect target url */)
607 // Notifies when a plugin couldn't be loaded because it's outdated.
608 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin
,
609 int /* placeholder ID */,
610 std::string
/* plug-in group identifier */)
612 // Notifies when a plugin couldn't be loaded because it requires
613 // user authorization.
614 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin
,
615 base::string16
/* name */,
616 std::string
/* plug-in group identifier */)
618 // Provide the browser process with information about the WebCore resource
619 // cache and current renderer framerate.
620 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats
,
621 blink::WebCache::ResourceTypeStats
)
623 // Notifies the browser that a page has been translated.
624 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated
,
626 std::string
/* the original language */,
627 std::string
/* the translated language */,
628 TranslateErrors::Type
/* the error type if available */)
630 // Message sent from the renderer to the browser to notify it of a
631 // window.print() call which should cancel the prerender. The message is sent
632 // only when the renderer is prerendering.
633 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting
)
635 // Sent by the renderer to check if a URL has permission to trigger a clipboard
636 // read/write operation from the DOM.
637 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardRead
,
640 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardWrite
,
644 // Sent by the renderer to check if a URL has permission to access WebGL
645 // extension WEBGL_debug_renderer_info.
646 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_IsWebGLDebugRendererInfoAllowed
,
650 // Sent when the renderer was prevented from displaying insecure content in
651 // a secure page by a security policy. The page may appear incomplete.
652 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent
)
654 // Sent when the renderer was prevented from running insecure content in
655 // a secure origin by a security policy. The page may appear incomplete.
656 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent
)
658 #if defined(OS_ANDROID)
659 // Contains info about whether the current page can be treated as a webapp.
660 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveWebappInformation
,
662 bool /* is_mobile_webapp_capable */,
663 bool /* is_apple_mobile_webapp_capable */,
664 GURL
/* expected_url */)
665 #endif // defined(OS_ANDROID)
667 // The currently displayed PDF has an unsupported feature.
668 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature
)
670 // Brings up SaveAs... dialog to save specified URL.
671 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PDFSaveURLAs
,
673 content::Referrer
/* referrer */)
675 // Updates the content restrictions, i.e. to disable print/copy.
676 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PDFUpdateContentRestrictions
,
677 int /* restrictions */)
679 // Brings up a Password... dialog for protected documents.
680 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_PDFModalPromptForPassword
,
681 std::string
/* prompt */,
682 std::string
/* actual_value */)
684 // This message indicates the error appeared in the frame.
685 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError
,
688 // This message indicates the monitored frame loading had completed.
689 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted
)
691 // Provide the browser process with current renderer framerate.
692 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS
,
693 int /* routing id */,
694 float /* frames per second */)
696 // Logs events from InstantExtended New Tab Pages.
697 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_LogEvent
,
699 NTPLoggingEventType
/* event */)
701 // Logs an impression on one of the Most Visited tile on the InstantExtended
703 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogImpression
,
706 base::string16
/* provider */)
708 // The Instant page asks for Chrome identity check against |identity|.
709 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck
,
711 base::string16
/* identity */)
713 // Tells InstantExtended to set the omnibox focus state.
714 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox
,
716 OmniboxFocusState
/* state */)
718 // Tells InstantExtended to paste text into the omnibox. If text is empty,
719 // the clipboard contents will be pasted. This causes the omnibox dropdown to
721 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown
,
723 base::string16
/* text to be pasted */)
725 // Tells InstantExtended whether the embedded search API is supported.
726 // See http://dev.chromium.org/embeddedsearch
727 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined
,
731 // Tells InstantExtended to delete a most visited item.
732 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem
,
736 // Tells InstantExtended to navigate the active tab to a possibly privileged
738 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate
,
740 GURL
/* destination */,
741 WindowOpenDisposition
/* disposition */,
742 bool /*is_most_visited_item_url*/)
744 // Tells InstantExtended to undo all most visited item deletions.
745 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions
,
748 // Tells InstantExtended to undo one most visited item deletion.
749 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion
,
753 // Tells InstantExtended whether the page supports voice search.
754 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported
,
756 bool /* supported */)
758 // Tells the renderer a list of URLs which should be bounced back to the browser
759 // process so that they can be assigned to an Instant renderer.
760 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs
,
761 std::vector
<GURL
> /* search_urls */,
762 GURL
/* new_tab_page_url */)
764 // Tells listeners that a detailed message was reported to the console by
766 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DetailedConsoleMessageAdded
,
767 base::string16
/* message */,
768 base::string16
/* source */,
769 extensions::StackTrace
/* stack trace */,
770 int32
/* severity level */)