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.
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 "content/public/common/common_param_traits.h"
29 #include "content/public/common/referrer.h"
30 #include "content/public/common/top_controls_state.h"
31 #include "extensions/common/stack_frame.h"
32 #include "ipc/ipc_channel_handle.h"
33 #include "ipc/ipc_message_macros.h"
34 #include "ipc/ipc_platform_file.h"
35 #include "third_party/WebKit/public/web/WebCache.h"
36 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
37 #include "third_party/skia/include/core/SkBitmap.h"
38 #include "ui/base/window_open_disposition.h"
39 #include "ui/gfx/ipc/gfx_param_traits.h"
40 #include "ui/gfx/rect.h"
42 // Singly-included section for enums and custom IPC traits.
43 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
44 #define CHROME_COMMON_RENDER_MESSAGES_H_
46 // This enum is inside a struct so that we can forward-declare the struct in
47 // others headers without having to include this one.
48 struct ChromeViewHostMsg_GetPluginInfo_Status
{
62 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed
) {}
70 struct ParamTraits
<ContentSettingsPattern
> {
71 typedef ContentSettingsPattern param_type
;
72 static void Write(Message
* m
, const param_type
& p
);
73 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
74 static void Log(const param_type
& p
, std::string
* l
);
79 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
81 #define IPC_MESSAGE_START ChromeMsgStart
83 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status::Value
,
84 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized
)
85 IPC_ENUM_TRAITS(OmniboxFocusChangeReason
)
86 IPC_ENUM_TRAITS(OmniboxFocusState
)
87 IPC_ENUM_TRAITS(search_provider::OSDDType
)
88 IPC_ENUM_TRAITS(search_provider::InstallState
)
89 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment
)
90 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling
)
91 IPC_ENUM_TRAITS(blink::WebConsoleMessage::Level
)
92 IPC_ENUM_TRAITS(content::TopControlsState
)
94 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status
)
95 IPC_STRUCT_TRAITS_MEMBER(value
)
96 IPC_STRUCT_TRAITS_END()
98 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
99 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output
)
100 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status
, status
)
101 IPC_STRUCT_MEMBER(content::WebPluginInfo
, plugin
)
102 IPC_STRUCT_MEMBER(std::string
, actual_mime_type
)
103 IPC_STRUCT_MEMBER(std::string
, group_identifier
)
104 IPC_STRUCT_MEMBER(base::string16
, group_name
)
107 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts
)
108 IPC_STRUCT_TRAITS_MEMBER(scheme
)
109 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard
)
110 IPC_STRUCT_TRAITS_MEMBER(host
)
111 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard
)
112 IPC_STRUCT_TRAITS_MEMBER(port
)
113 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard
)
114 IPC_STRUCT_TRAITS_MEMBER(path
)
115 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard
)
116 IPC_STRUCT_TRAITS_END()
118 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource
)
119 IPC_STRUCT_TRAITS_MEMBER(primary_pattern
)
120 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern
)
121 IPC_STRUCT_TRAITS_MEMBER(setting
)
122 IPC_STRUCT_TRAITS_MEMBER(source
)
123 IPC_STRUCT_TRAITS_MEMBER(incognito
)
124 IPC_STRUCT_TRAITS_END()
126 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion
)
127 IPC_STRUCT_TRAITS_MEMBER(text
)
128 IPC_STRUCT_TRAITS_MEMBER(metadata
)
129 IPC_STRUCT_TRAITS_END()
131 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem
)
132 IPC_STRUCT_TRAITS_MEMBER(url
)
133 IPC_STRUCT_TRAITS_MEMBER(title
)
134 IPC_STRUCT_TRAITS_END()
136 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules
)
137 IPC_STRUCT_TRAITS_MEMBER(image_rules
)
138 IPC_STRUCT_TRAITS_MEMBER(script_rules
)
139 IPC_STRUCT_TRAITS_END()
141 IPC_STRUCT_TRAITS_BEGIN(RGBAColor
)
142 IPC_STRUCT_TRAITS_MEMBER(r
)
143 IPC_STRUCT_TRAITS_MEMBER(g
)
144 IPC_STRUCT_TRAITS_MEMBER(b
)
145 IPC_STRUCT_TRAITS_MEMBER(a
)
146 IPC_STRUCT_TRAITS_END()
148 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo
)
149 IPC_STRUCT_TRAITS_MEMBER(using_default_theme
)
150 IPC_STRUCT_TRAITS_MEMBER(background_color
)
151 IPC_STRUCT_TRAITS_MEMBER(text_color
)
152 IPC_STRUCT_TRAITS_MEMBER(link_color
)
153 IPC_STRUCT_TRAITS_MEMBER(text_color_light
)
154 IPC_STRUCT_TRAITS_MEMBER(header_color
)
155 IPC_STRUCT_TRAITS_MEMBER(section_border_color
)
156 IPC_STRUCT_TRAITS_MEMBER(theme_id
)
157 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment
)
158 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment
)
159 IPC_STRUCT_TRAITS_MEMBER(image_tiling
)
160 IPC_STRUCT_TRAITS_MEMBER(image_height
)
161 IPC_STRUCT_TRAITS_MEMBER(has_attribution
)
162 IPC_STRUCT_TRAITS_MEMBER(logo_alternate
)
163 IPC_STRUCT_TRAITS_END()
165 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStat
)
166 IPC_STRUCT_TRAITS_MEMBER(count
)
167 IPC_STRUCT_TRAITS_MEMBER(size
)
168 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
169 IPC_STRUCT_TRAITS_MEMBER(decodedSize
)
170 IPC_STRUCT_TRAITS_END()
172 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStats
)
173 IPC_STRUCT_TRAITS_MEMBER(images
)
174 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets
)
175 IPC_STRUCT_TRAITS_MEMBER(scripts
)
176 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets
)
177 IPC_STRUCT_TRAITS_MEMBER(fonts
)
178 IPC_STRUCT_TRAITS_END()
180 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats
)
181 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity
)
182 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity
)
183 IPC_STRUCT_TRAITS_MEMBER(capacity
)
184 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
185 IPC_STRUCT_TRAITS_MEMBER(deadSize
)
186 IPC_STRUCT_TRAITS_END()
188 IPC_STRUCT_TRAITS_BEGIN(extensions::StackFrame
)
189 IPC_STRUCT_TRAITS_MEMBER(line_number
)
190 IPC_STRUCT_TRAITS_MEMBER(column_number
)
191 IPC_STRUCT_TRAITS_MEMBER(source
)
192 IPC_STRUCT_TRAITS_MEMBER(function
)
193 IPC_STRUCT_TRAITS_END()
195 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType
,
198 //-----------------------------------------------------------------------------
199 // RenderView messages
200 // These are messages sent from the browser to the renderer process.
202 // Tells the renderer to set its maximum cache size to the supplied value.
203 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities
,
204 size_t /* min_dead_capacity */,
205 size_t /* max_dead_capacity */,
206 size_t /* capacity */)
208 // Tells the renderer to clear the cache.
209 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache
,
210 bool /* on_navigation */)
212 #if defined(ENABLE_EXTENSIONS)
213 // Set the top-level frame to the provided name.
214 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetName
,
215 std::string
/* frame_name */)
218 #if !defined(OS_ANDROID) && !defined(OS_IOS)
219 // For WebUI testing, this message requests JavaScript to be executed at a time
220 // which is late enough to not be thrown out, and early enough to be before
221 // onload events are fired.
222 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript
,
223 base::string16
/* javascript */)
226 // Set the content setting rules stored by the renderer.
227 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules
,
228 RendererContentSettingRules
/* rules */)
230 // Tells the render frame to load all blocked plugins with the given identifier.
231 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins
,
232 std::string
/* identifier */)
234 // Asks the renderer to send back stats on the WebCore cache broken down by
236 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats
)
238 // Tells the renderer to create a FieldTrial, and by using a 100% probability
239 // for the FieldTrial, forces the FieldTrial to have assigned group name.
240 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup
,
241 std::string
/* field trial name */,
242 std::string
/* group name that was assigned. */)
244 // Asks the renderer to send back V8 heap stats.
245 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats
)
247 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetPageSequenceNumber
,
248 int /* page_seq_no */)
250 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant
)
252 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults
,
253 bool /* display_instant_results */)
255 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged
,
256 OmniboxFocusState
/* new_focus_state */,
257 OmniboxFocusChangeReason
/* reason */)
259 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMarginChange
, int /* start */)
261 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged
,
262 std::vector
<InstantMostVisitedItem
> /* items */)
264 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation
,
265 bool /* is_app_launcher_enabled */)
267 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress
,
268 bool /* input_in_progress */)
270 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch
,
271 InstantSuggestion
/* suggestion */)
273 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit
,
274 base::string16
/* value */)
276 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged
,
277 ThemeBackgroundInfo
/* value */)
279 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult
,
280 base::string16
/* identity */,
281 bool /* identity_match */)
283 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch
)
285 #if defined(ENABLE_EXTENSIONS)
286 // Toggles visual muting of the render view area. This is on when a constrained
287 // window is showing.
288 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized
,
289 bool /* deemphazied */)
292 // Sent on process startup to indicate whether this process is running in
294 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess
,
295 bool /* is_incognito_processs */)
297 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
298 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent
,
301 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
302 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent
,
305 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame
)
307 // Tells the renderer whether or not a file system access has been allowed.
308 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestFileSystemAccessAsyncResponse
,
309 int /* request_id */,
312 // Sent when the profile changes the kSafeBrowsingEnabled preference.
313 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection
,
314 bool /* enable_phishing_detection */)
316 // Asks the renderer for a thumbnail of the image selected by the most
317 // recently opened context menu, if there is one. If the image's area
318 // is greater than thumbnail_min_area it will be downscaled to
319 // be within thumbnail_max_size. The possibly downsampled image will be
320 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
321 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode
,
322 int /* thumbnail_min_area_pixels */,
323 gfx::Size
/* thumbnail_max_size_pixels */)
325 // Notifies the renderer whether hiding/showing the top controls is enabled,
326 // what the current state should be, and whether or not to animate to the
328 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState
,
329 content::TopControlsState
/* constraints */,
330 content::TopControlsState
/* current */,
334 // Updates the window features of the render view.
335 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures
,
336 blink::WebWindowFeatures
/* window_features */)
338 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK
,
339 SkBitmap
/* thumbnail */,
340 gfx::Size
/* original size of the image */)
342 #if defined(OS_ANDROID)
343 // Asks the renderer to return information about whether the current page can
344 // be treated as a webapp.
345 IPC_MESSAGE_ROUTED1(ChromeViewMsg_RetrieveWebappInformation
,
346 GURL
/* expected_url */)
348 // Asks the renderer to return information about the given meta tag.
349 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RetrieveMetaTagContent
,
350 GURL
/* expected_url */,
351 std::string
/* tag_name */ )
352 #endif // defined(OS_ANDROID)
354 // chrome.principals messages ------------------------------------------------
356 // Message sent from the renderer to the browser to get the list of browser
357 // managed accounts for the given origin.
358 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts
,
359 GURL
/* current URL */,
360 std::vector
<std::string
> /* managed accounts */)
362 // Message sent from the renderer to the browser to show the browser account
364 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI
)
366 // JavaScript related messages -----------------------------------------------
368 // Tells the frame it is displaying an interstitial page.
369 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial
)
371 // Provides the renderer with the results of the browser's investigation into
372 // why a recent main frame load failed (currently, just DNS probe result).
373 // NetErrorHelper will receive this mesage and replace or update the error
374 // page with more specific troubleshooting suggestions.
375 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo
,
376 int /* DNS probe status */)
378 // Provides the information needed by the renderer process to contact a
379 // navigation correction service. Handled by the NetErrorHelper.
380 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo
,
381 GURL
/* Navigation correction service base URL */,
382 std::string
/* language */,
383 std::string
/* origin_country */,
384 std::string
/* API key to use */,
385 GURL
/* Google Search URL to use */)
387 //-----------------------------------------------------------------------------
389 // These are messages sent from the renderer to the browser process.
391 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats
,
392 blink::WebCache::UsageStats
/* stats */)
394 // Tells the browser that content in the current page was blocked due to the
395 // user's content settings.
396 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_ContentBlocked
,
397 ContentSettingsType
/* type of blocked content */)
399 // Sent by the renderer process to check whether access to web databases is
400 // granted by content settings.
401 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase
,
402 int /* render_frame_id */,
403 GURL
/* origin_url */,
404 GURL
/* top origin url */,
405 base::string16
/* database name */,
406 base::string16
/* database display name */,
409 // Sent by the renderer process to check whether access to DOM Storage is
410 // granted by content settings.
411 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage
,
412 int /* render_frame_id */,
413 GURL
/* origin_url */,
414 GURL
/* top origin url */,
415 bool /* if true local storage, otherwise session */,
418 // Sent by the renderer process to check whether access to FileSystem is
419 // granted by content settings.
420 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_RequestFileSystemAccessSync
,
421 int /* render_frame_id */,
422 GURL
/* origin_url */,
423 GURL
/* top origin url */,
426 // Sent by the renderer process to check whether access to FileSystem is
427 // granted by content settings.
428 IPC_MESSAGE_CONTROL4(ChromeViewHostMsg_RequestFileSystemAccessAsync
,
429 int /* render_frame_id */,
430 int /* request_id */,
431 GURL
/* origin_url */,
432 GURL
/* top origin url */)
434 // Sent by the renderer process to check whether access to Indexed DBis
435 // granted by content settings.
436 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB
,
437 int /* render_frame_id */,
438 GURL
/* origin_url */,
439 GURL
/* top origin url */,
440 base::string16
/* database name */,
443 // Return information about a plugin for the given URL and MIME type.
444 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
445 // about specific reasons why a plug-in can't be used, for example because it's
447 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo
,
448 int /* render_frame_id */,
450 GURL
/* top origin url */,
451 std::string
/* mime_type */,
452 ChromeViewHostMsg_GetPluginInfo_Output
/* output */)
454 #if defined(ENABLE_PEPPER_CDMS)
455 // Returns whether any internal plugin supporting |mime_type| is registered
456 // Does not determine whether the plugin can actually be instantiated
457 // (e.g. whether it is allowed or has all its dependencies).
458 // When the returned *|is_registered| is true, |additional_param_names| and
459 // |additional_param_values| contain the name-value pairs, if any, specified
460 // for the *first* plugin found that is registered for |mime_type|.
461 IPC_SYNC_MESSAGE_CONTROL1_3(
462 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType
,
463 std::string
/* mime_type */,
464 bool /* registered */,
465 std::vector
<base::string16
> /* additional_param_names */,
466 std::vector
<base::string16
> /* additional_param_values */)
469 #if defined(ENABLE_EXTENSIONS)
470 // Informs the browser of updated frame names.
471 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_UpdateFrameName
,
472 bool /* is_top_level */,
473 std::string
/* name */)
476 #if defined(ENABLE_PLUGIN_INSTALLATION)
477 // Tells the browser to search for a plug-in that can handle the given MIME
478 // type. The result will be sent asynchronously to the routing ID
480 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin
,
481 int /* placeholder_id */,
482 std::string
/* mime_type */)
484 // Notifies the browser that a missing plug-in placeholder has been removed, so
485 // the corresponding PluginPlaceholderHost can be deleted.
486 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost
,
487 int /* placeholder_id */)
489 // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
491 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin
,
492 base::string16
/* plugin_name */)
494 // Notifies a missing plug-in placeholder that no plug-in has been found.
495 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin
)
497 // Notifies a missing plug-in placeholder that we have started downloading
499 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin
)
501 // Notifies a missing plug-in placeholder that we have finished downloading
503 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin
)
505 // Notifies a missing plug-in placeholder that there was an error downloading
507 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin
,
508 std::string
/* message */)
509 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
511 // Notifies a missing plug-in placeholder that the user cancelled downloading
513 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin
)
515 // Tells the browser to open chrome://plugins in a new tab. We use a separate
516 // message because renderer processes aren't allowed to directly navigate to
518 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins
)
520 // Tells the browser that there was an error loading a plug-in.
521 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin
,
522 base::FilePath
/* plugin_path */)
524 // Tells the browser that we blocked a plug-in because NPAPI is not supported.
525 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported
,
526 std::string
/* identifer */)
528 // Tells the renderer that the NPAPI cannot be used. For example Ash on windows.
529 IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported
)
531 // Notification that the page has an OpenSearch description document
532 // associated with it.
533 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD
,
536 search_provider::OSDDType
)
538 // Find out if the given url's security origin is installed as a search
540 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState
,
542 GURL
/* inquiry url */,
543 search_provider::InstallState
/* install */)
545 // Sends back stats about the V8 heap.
546 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats
,
547 int /* size of heap (allocated from the OS) */,
548 int /* bytes in use */)
550 // Request for a DNS prefetch of the names in the array.
551 // NameList is typedef'ed std::vector<std::string>
552 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch
,
553 std::vector
<std::string
> /* hostnames */)
555 // Request for preconnect to host providing resource specified by URL
556 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_Preconnect
,
557 GURL
/* preconnect target url */)
559 // Notifies when a plugin couldn't be loaded because it's outdated.
560 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin
,
561 int /* placeholder ID */,
562 std::string
/* plug-in group identifier */)
564 // Notifies when a plugin couldn't be loaded because it requires
565 // user authorization.
566 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin
,
567 base::string16
/* name */,
568 std::string
/* plug-in group identifier */)
570 // Provide the browser process with information about the WebCore resource
571 // cache and current renderer framerate.
572 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats
,
573 blink::WebCache::ResourceTypeStats
)
575 // Message sent from the renderer to the browser to notify it of a
576 // window.print() call which should cancel the prerender. The message is sent
577 // only when the renderer is prerendering.
578 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting
)
580 #if defined(ENABLE_EXTENSIONS)
581 // Sent by the renderer to check if a URL has permission to trigger a clipboard
582 // read/write operation from the DOM.
583 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardRead
,
586 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardWrite
,
591 // Sent when the renderer was prevented from displaying insecure content in
592 // a secure page by a security policy. The page may appear incomplete.
593 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent
)
595 // Sent when the renderer was prevented from running insecure content in
596 // a secure origin by a security policy. The page may appear incomplete.
597 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent
)
599 #if defined(OS_ANDROID)
600 // Contains info about whether the current page can be treated as a webapp.
601 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveWebappInformation
,
603 bool /* is_mobile_webapp_capable */,
604 bool /* is_apple_mobile_webapp_capable */,
605 GURL
/* expected_url */)
607 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveMetaTagContent
,
609 std::string
/* tag_name */,
610 std::string
/* tag_content */,
611 GURL
/* expected_url */)
612 #endif // defined(OS_ANDROID)
614 // The currently displayed PDF has an unsupported feature.
615 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature
)
617 // Brings up SaveAs... dialog to save specified URL.
618 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PDFSaveURLAs
,
620 content::Referrer
/* referrer */)
622 // Updates the content restrictions, i.e. to disable print/copy.
623 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PDFUpdateContentRestrictions
,
624 int /* restrictions */)
626 // Brings up a Password... dialog for protected documents.
627 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_PDFModalPromptForPassword
,
628 std::string
/* prompt */,
629 std::string
/* actual_value */)
631 // This message indicates the error appeared in the frame.
632 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError
,
635 // This message indicates the monitored frame loading had completed.
636 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted
)
638 // Logs events from InstantExtended New Tab Pages.
639 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_LogEvent
,
640 int /* page_seq_no */,
641 NTPLoggingEventType
/* event */)
643 // Logs an impression on one of the Most Visited tile on the InstantExtended
645 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression
,
646 int /* page_seq_no */,
648 base::string16
/* provider */)
650 // Logs a navigation on one of the Most Visited tile on the InstantExtended
652 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation
,
653 int /* page_seq_no */,
655 base::string16
/* provider */)
657 // The Instant page asks for Chrome identity check against |identity|.
658 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck
,
659 int /* page_seq_no */,
660 base::string16
/* identity */)
662 // Tells InstantExtended to set the omnibox focus state.
663 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox
,
664 int /* page_seq_no */,
665 OmniboxFocusState
/* state */)
667 // Tells InstantExtended to paste text into the omnibox. If text is empty,
668 // the clipboard contents will be pasted. This causes the omnibox dropdown to
670 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown
,
671 int /* page_seq_no */,
672 base::string16
/* text to be pasted */)
674 // Tells InstantExtended whether the embedded search API is supported.
675 // See http://dev.chromium.org/embeddedsearch
676 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined
,
677 int /* page_seq_no */,
680 // Tells InstantExtended to delete a most visited item.
681 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem
,
682 int /* page_seq_no */,
685 // Tells InstantExtended to navigate the active tab to a possibly privileged
687 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate
,
688 int /* page_seq_no */,
689 GURL
/* destination */,
690 WindowOpenDisposition
/* disposition */,
691 bool /*is_most_visited_item_url*/)
693 // Tells InstantExtended to undo all most visited item deletions.
694 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions
,
695 int /* page_seq_no */)
697 // Tells InstantExtended to undo one most visited item deletion.
698 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion
,
699 int /* page_seq_no */,
702 // Tells InstantExtended whether the page supports voice search.
703 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported
,
704 int /* page_seq_no */,
705 bool /* supported */)
707 // Tells the renderer a list of URLs which should be bounced back to the browser
708 // process so that they can be assigned to an Instant renderer.
709 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs
,
710 std::vector
<GURL
> /* search_urls */,
711 GURL
/* new_tab_page_url */)
713 // TODO(thestig) Eventually separate out all the extensions messages.
714 #if defined(ENABLE_EXTENSIONS)
715 // Tells listeners that a detailed message was reported to the console by
717 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DetailedConsoleMessageAdded
,
718 base::string16
/* message */,
719 base::string16
/* source */,
720 extensions::StackTrace
/* stack trace */,
721 int32
/* severity level */)
724 #if defined(ENABLE_PLUGINS)
725 // Sent by the renderer to check if crash reporting is enabled.
726 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled
,