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/common_param_traits.h"
20 #include "chrome/common/instant_types.h"
21 #include "chrome/common/ntp_logging_events.h"
22 #include "chrome/common/omnibox_focus_state.h"
23 #include "chrome/common/search_provider.h"
24 #include "chrome/common/web_application_info.h"
25 #include "components/content_settings/core/common/content_settings.h"
26 #include "components/content_settings/core/common/content_settings_pattern.h"
27 #include "components/content_settings/core/common/content_settings_types.h"
28 #include "components/nacl/common/nacl_types.h"
29 #include "content/public/common/common_param_traits.h"
30 #include "content/public/common/referrer.h"
31 #include "content/public/common/top_controls_state.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_MAX_VALUE(OmniboxFocusChangeReason
,
86 OMNIBOX_FOCUS_CHANGE_REASON_LAST
)
87 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState
, OMNIBOX_FOCUS_STATE_LAST
)
88 IPC_ENUM_TRAITS_MAX_VALUE(search_provider::OSDDType
,
89 search_provider::OSDD_TYPE_LAST
)
90 IPC_ENUM_TRAITS(search_provider::InstallState
)
91 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment
)
92 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling
)
93 IPC_ENUM_TRAITS(blink::WebConsoleMessage::Level
)
94 IPC_ENUM_TRAITS(content::TopControlsState
)
96 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status
)
97 IPC_STRUCT_TRAITS_MEMBER(value
)
98 IPC_STRUCT_TRAITS_END()
100 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
101 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output
)
102 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status
, status
)
103 IPC_STRUCT_MEMBER(content::WebPluginInfo
, plugin
)
104 IPC_STRUCT_MEMBER(std::string
, actual_mime_type
)
105 IPC_STRUCT_MEMBER(std::string
, group_identifier
)
106 IPC_STRUCT_MEMBER(base::string16
, group_name
)
109 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts
)
110 IPC_STRUCT_TRAITS_MEMBER(scheme
)
111 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard
)
112 IPC_STRUCT_TRAITS_MEMBER(host
)
113 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard
)
114 IPC_STRUCT_TRAITS_MEMBER(port
)
115 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard
)
116 IPC_STRUCT_TRAITS_MEMBER(path
)
117 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard
)
118 IPC_STRUCT_TRAITS_END()
120 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource
)
121 IPC_STRUCT_TRAITS_MEMBER(primary_pattern
)
122 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern
)
123 IPC_STRUCT_TRAITS_MEMBER(setting
)
124 IPC_STRUCT_TRAITS_MEMBER(source
)
125 IPC_STRUCT_TRAITS_MEMBER(incognito
)
126 IPC_STRUCT_TRAITS_END()
128 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion
)
129 IPC_STRUCT_TRAITS_MEMBER(text
)
130 IPC_STRUCT_TRAITS_MEMBER(metadata
)
131 IPC_STRUCT_TRAITS_END()
133 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem
)
134 IPC_STRUCT_TRAITS_MEMBER(url
)
135 IPC_STRUCT_TRAITS_MEMBER(title
)
136 IPC_STRUCT_TRAITS_END()
138 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules
)
139 IPC_STRUCT_TRAITS_MEMBER(image_rules
)
140 IPC_STRUCT_TRAITS_MEMBER(script_rules
)
141 IPC_STRUCT_TRAITS_END()
143 IPC_STRUCT_TRAITS_BEGIN(RGBAColor
)
144 IPC_STRUCT_TRAITS_MEMBER(r
)
145 IPC_STRUCT_TRAITS_MEMBER(g
)
146 IPC_STRUCT_TRAITS_MEMBER(b
)
147 IPC_STRUCT_TRAITS_MEMBER(a
)
148 IPC_STRUCT_TRAITS_END()
150 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo
)
151 IPC_STRUCT_TRAITS_MEMBER(using_default_theme
)
152 IPC_STRUCT_TRAITS_MEMBER(background_color
)
153 IPC_STRUCT_TRAITS_MEMBER(text_color
)
154 IPC_STRUCT_TRAITS_MEMBER(link_color
)
155 IPC_STRUCT_TRAITS_MEMBER(text_color_light
)
156 IPC_STRUCT_TRAITS_MEMBER(header_color
)
157 IPC_STRUCT_TRAITS_MEMBER(section_border_color
)
158 IPC_STRUCT_TRAITS_MEMBER(theme_id
)
159 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment
)
160 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment
)
161 IPC_STRUCT_TRAITS_MEMBER(image_tiling
)
162 IPC_STRUCT_TRAITS_MEMBER(image_height
)
163 IPC_STRUCT_TRAITS_MEMBER(has_attribution
)
164 IPC_STRUCT_TRAITS_MEMBER(logo_alternate
)
165 IPC_STRUCT_TRAITS_END()
167 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStat
)
168 IPC_STRUCT_TRAITS_MEMBER(count
)
169 IPC_STRUCT_TRAITS_MEMBER(size
)
170 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
171 IPC_STRUCT_TRAITS_MEMBER(decodedSize
)
172 IPC_STRUCT_TRAITS_END()
174 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStats
)
175 IPC_STRUCT_TRAITS_MEMBER(images
)
176 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets
)
177 IPC_STRUCT_TRAITS_MEMBER(scripts
)
178 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets
)
179 IPC_STRUCT_TRAITS_MEMBER(fonts
)
180 IPC_STRUCT_TRAITS_END()
182 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats
)
183 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity
)
184 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity
)
185 IPC_STRUCT_TRAITS_MEMBER(capacity
)
186 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
187 IPC_STRUCT_TRAITS_MEMBER(deadSize
)
188 IPC_STRUCT_TRAITS_END()
190 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType
,
193 IPC_ENUM_TRAITS_MAX_VALUE(WebApplicationInfo::MobileCapable
,
194 WebApplicationInfo::MOBILE_CAPABLE_APPLE
)
196 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo
)
197 IPC_STRUCT_TRAITS_MEMBER(url
)
198 IPC_STRUCT_TRAITS_MEMBER(width
)
199 IPC_STRUCT_TRAITS_MEMBER(height
)
200 IPC_STRUCT_TRAITS_MEMBER(data
)
201 IPC_STRUCT_TRAITS_END()
203 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo
)
204 IPC_STRUCT_TRAITS_MEMBER(title
)
205 IPC_STRUCT_TRAITS_MEMBER(description
)
206 IPC_STRUCT_TRAITS_MEMBER(app_url
)
207 IPC_STRUCT_TRAITS_MEMBER(icons
)
208 IPC_STRUCT_TRAITS_MEMBER(mobile_capable
)
209 IPC_STRUCT_TRAITS_END()
211 //-----------------------------------------------------------------------------
212 // RenderView messages
213 // These are messages sent from the browser to the renderer process.
215 #if !defined(OS_ANDROID) && !defined(OS_IOS)
216 // For WebUI testing, this message requests JavaScript to be executed at a time
217 // which is late enough to not be thrown out, and early enough to be before
218 // onload events are fired.
219 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript
,
220 base::string16
/* javascript */)
223 // Set the content setting rules stored by the renderer.
224 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules
,
225 RendererContentSettingRules
/* rules */)
227 // Tells the render frame to load all blocked plugins with the given identifier.
228 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins
,
229 std::string
/* identifier */)
231 // Asks the renderer to send back stats on the WebCore cache broken down by
233 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats
)
235 // Tells the renderer to create a FieldTrial, and by using a 100% probability
236 // for the FieldTrial, forces the FieldTrial to have assigned group name.
237 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup
,
238 std::string
/* field trial name */,
239 std::string
/* group name that was assigned. */)
241 // Asks the renderer to send back V8 heap stats.
242 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats
)
244 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetPageSequenceNumber
,
245 int /* page_seq_no */)
247 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant
)
249 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults
,
250 bool /* display_instant_results */)
252 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged
,
253 OmniboxFocusState
/* new_focus_state */,
254 OmniboxFocusChangeReason
/* reason */)
256 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMarginChange
, int /* start */)
258 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged
,
259 std::vector
<InstantMostVisitedItem
> /* items */)
261 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation
,
262 bool /* is_app_launcher_enabled */)
264 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress
,
265 bool /* input_in_progress */)
267 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch
,
268 InstantSuggestion
/* suggestion */)
270 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit
,
271 base::string16
/* value */)
273 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged
,
274 ThemeBackgroundInfo
/* value */)
276 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult
,
277 base::string16
/* identity */,
278 bool /* identity_match */)
280 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch
)
282 // Sent on process startup to indicate whether this process is running in
284 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess
,
285 bool /* is_incognito_processs */)
287 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
288 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent
,
291 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
292 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent
,
295 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame
)
297 // Tells the renderer whether or not a file system access has been allowed.
298 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestFileSystemAccessAsyncResponse
,
299 int /* request_id */,
302 // Sent when the profile changes the kSafeBrowsingEnabled preference.
303 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection
,
304 bool /* enable_phishing_detection */)
306 // Asks the renderer for a thumbnail of the image selected by the most
307 // recently opened context menu, if there is one. If the image's area
308 // is greater than thumbnail_min_area it will be downscaled to
309 // be within thumbnail_max_size. The possibly downsampled image will be
310 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
311 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode
,
312 int /* thumbnail_min_area_pixels */,
313 gfx::Size
/* thumbnail_max_size_pixels */)
315 // Notifies the renderer whether hiding/showing the top controls is enabled,
316 // what the current state should be, and whether or not to animate to the
318 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState
,
319 content::TopControlsState
/* constraints */,
320 content::TopControlsState
/* current */,
324 // Updates the window features of the render view.
325 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures
,
326 blink::WebWindowFeatures
/* window_features */)
328 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK
,
329 SkBitmap
/* thumbnail */,
330 gfx::Size
/* original size of the image */)
332 // Requests application info for the page. The renderer responds back with
333 // ChromeViewHostMsg_DidGetWebApplicationInfo.
334 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetWebApplicationInfo
)
336 #if defined(OS_ANDROID)
337 // Asks the renderer to return information about the given meta tag.
338 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RetrieveMetaTagContent
,
339 GURL
/* expected_url */,
340 std::string
/* tag_name */ )
341 #endif // defined(OS_ANDROID)
343 // chrome.principals messages ------------------------------------------------
345 // Message sent from the renderer to the browser to get the list of browser
346 // managed accounts for the given origin.
347 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts
,
348 GURL
/* current URL */,
349 std::vector
<std::string
> /* managed accounts */)
351 // Message sent from the renderer to the browser to show the browser account
353 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI
)
355 // JavaScript related messages -----------------------------------------------
357 // Tells the frame it is displaying an interstitial page.
358 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial
)
360 // Provides the renderer with the results of the browser's investigation into
361 // why a recent main frame load failed (currently, just DNS probe result).
362 // NetErrorHelper will receive this mesage and replace or update the error
363 // page with more specific troubleshooting suggestions.
364 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo
,
365 int /* DNS probe status */)
367 // Provides the information needed by the renderer process to contact a
368 // navigation correction service. Handled by the NetErrorHelper.
369 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo
,
370 GURL
/* Navigation correction service base URL */,
371 std::string
/* language */,
372 std::string
/* origin_country */,
373 std::string
/* API key to use */,
374 GURL
/* Google Search URL to use */)
376 //-----------------------------------------------------------------------------
378 // These are messages sent from the renderer to the browser process.
380 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats
,
381 blink::WebCache::UsageStats
/* stats */)
383 // Tells the browser that content in the current page was blocked due to the
384 // user's content settings.
385 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_ContentBlocked
,
386 ContentSettingsType
/* type of blocked content */)
388 // Sent by the renderer process to check whether access to web databases is
389 // granted by content settings.
390 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase
,
391 int /* render_frame_id */,
392 GURL
/* origin_url */,
393 GURL
/* top origin url */,
394 base::string16
/* database name */,
395 base::string16
/* database display name */,
398 // Sent by the renderer process to check whether access to DOM Storage is
399 // granted by content settings.
400 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage
,
401 int /* render_frame_id */,
402 GURL
/* origin_url */,
403 GURL
/* top origin url */,
404 bool /* if true local storage, otherwise session */,
407 // Sent by the renderer process to check whether access to FileSystem is
408 // granted by content settings.
409 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_RequestFileSystemAccessSync
,
410 int /* render_frame_id */,
411 GURL
/* origin_url */,
412 GURL
/* top origin url */,
415 // Sent by the renderer process to check whether access to FileSystem is
416 // granted by content settings.
417 IPC_MESSAGE_CONTROL4(ChromeViewHostMsg_RequestFileSystemAccessAsync
,
418 int /* render_frame_id */,
419 int /* request_id */,
420 GURL
/* origin_url */,
421 GURL
/* top origin url */)
423 // Sent by the renderer process to check whether access to Indexed DBis
424 // granted by content settings.
425 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB
,
426 int /* render_frame_id */,
427 GURL
/* origin_url */,
428 GURL
/* top origin url */,
429 base::string16
/* database name */,
432 // Return information about a plugin for the given URL and MIME type.
433 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
434 // about specific reasons why a plug-in can't be used, for example because it's
436 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo
,
437 int /* render_frame_id */,
439 GURL
/* top origin url */,
440 std::string
/* mime_type */,
441 ChromeViewHostMsg_GetPluginInfo_Output
/* output */)
443 #if defined(ENABLE_PEPPER_CDMS)
444 // Returns whether any internal plugin supporting |mime_type| is registered and
445 // enabled. Does not determine whether the plugin can actually be instantiated
446 // (e.g. whether it has all its dependencies).
447 // When the returned *|is_available| is true, |additional_param_names| and
448 // |additional_param_values| contain the name-value pairs, if any, specified
449 // for the *first* non-disabled plugin found that is registered for |mime_type|.
450 IPC_SYNC_MESSAGE_CONTROL1_3(
451 ChromeViewHostMsg_IsInternalPluginAvailableForMimeType
,
452 std::string
/* mime_type */,
453 bool /* is_available */,
454 std::vector
<base::string16
> /* additional_param_names */,
455 std::vector
<base::string16
> /* additional_param_values */)
458 #if defined(ENABLE_PLUGIN_INSTALLATION)
459 // Tells the browser to search for a plug-in that can handle the given MIME
460 // type. The result will be sent asynchronously to the routing ID
462 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin
,
463 int /* placeholder_id */,
464 std::string
/* mime_type */)
466 // Notifies the browser that a missing plug-in placeholder has been removed, so
467 // the corresponding PluginPlaceholderHost can be deleted.
468 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost
,
469 int /* placeholder_id */)
471 // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
473 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin
,
474 base::string16
/* plugin_name */)
476 // Notifies a missing plug-in placeholder that no plug-in has been found.
477 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin
)
479 // Notifies a missing plug-in placeholder that we have started downloading
481 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin
)
483 // Notifies a missing plug-in placeholder that we have finished downloading
485 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin
)
487 // Notifies a missing plug-in placeholder that there was an error downloading
489 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin
,
490 std::string
/* message */)
491 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
493 // Notifies a missing plug-in placeholder that the user cancelled downloading
495 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin
)
497 // Tells the browser to open chrome://plugins in a new tab. We use a separate
498 // message because renderer processes aren't allowed to directly navigate to
500 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins
)
502 // Tells the browser that there was an error loading a plug-in.
503 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin
,
504 base::FilePath
/* plugin_path */)
506 // Tells the browser that we blocked a plug-in because NPAPI is not supported.
507 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported
,
508 std::string
/* identifer */)
510 // Tells the renderer that the NPAPI cannot be used. For example Ash on windows.
511 IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported
)
513 // Notification that the page has an OpenSearch description document
514 // associated with it.
515 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD
,
518 search_provider::OSDDType
)
520 // Find out if the given url's security origin is installed as a search
522 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState
,
524 GURL
/* inquiry url */,
525 search_provider::InstallState
/* install */)
527 // Sends back stats about the V8 heap.
528 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats
,
529 int /* size of heap (allocated from the OS) */,
530 int /* bytes in use */)
532 // Request for a DNS prefetch of the names in the array.
533 // NameList is typedef'ed std::vector<std::string>
534 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch
,
535 std::vector
<std::string
> /* hostnames */)
537 // Request for preconnect to host providing resource specified by URL
538 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_Preconnect
,
539 GURL
/* preconnect target url */)
541 // Notifies when a plugin couldn't be loaded because it's outdated.
542 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin
,
543 int /* placeholder ID */,
544 std::string
/* plug-in group identifier */)
546 // Notifies when a plugin couldn't be loaded because it requires
547 // user authorization.
548 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin
,
549 base::string16
/* name */,
550 std::string
/* plug-in group identifier */)
552 // Provide the browser process with information about the WebCore resource
553 // cache and current renderer framerate.
554 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats
,
555 blink::WebCache::ResourceTypeStats
)
557 // Message sent from the renderer to the browser to notify it of a
558 // window.print() call which should cancel the prerender. The message is sent
559 // only when the renderer is prerendering.
560 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting
)
562 // Sent when the renderer was prevented from displaying insecure content in
563 // a secure page by a security policy. The page may appear incomplete.
564 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent
)
566 // Sent when the renderer was prevented from running insecure content in
567 // a secure origin by a security policy. The page may appear incomplete.
568 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent
)
570 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_DidGetWebApplicationInfo
,
573 #if defined(OS_ANDROID)
574 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveMetaTagContent
,
576 std::string
/* tag_name */,
577 std::string
/* tag_content */,
578 GURL
/* expected_url */)
579 #endif // defined(OS_ANDROID)
581 // Logs events from InstantExtended New Tab Pages.
582 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_LogEvent
,
583 int /* page_seq_no */,
584 NTPLoggingEventType
/* event */)
586 // Logs an impression on one of the Most Visited tile on the InstantExtended
588 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression
,
589 int /* page_seq_no */,
591 base::string16
/* provider */)
593 // Logs a navigation on one of the Most Visited tile on the InstantExtended
595 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation
,
596 int /* page_seq_no */,
598 base::string16
/* provider */)
600 // The Instant page asks for Chrome identity check against |identity|.
601 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck
,
602 int /* page_seq_no */,
603 base::string16
/* identity */)
605 // Tells InstantExtended to set the omnibox focus state.
606 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox
,
607 int /* page_seq_no */,
608 OmniboxFocusState
/* state */)
610 // Tells InstantExtended to paste text into the omnibox. If text is empty,
611 // the clipboard contents will be pasted. This causes the omnibox dropdown to
613 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown
,
614 int /* page_seq_no */,
615 base::string16
/* text to be pasted */)
617 // Tells InstantExtended whether the embedded search API is supported.
618 // See http://dev.chromium.org/embeddedsearch
619 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined
,
620 int /* page_seq_no */,
623 // Tells InstantExtended to delete a most visited item.
624 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem
,
625 int /* page_seq_no */,
628 // Tells InstantExtended to navigate the active tab to a possibly privileged
630 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate
,
631 int /* page_seq_no */,
632 GURL
/* destination */,
633 WindowOpenDisposition
/* disposition */,
634 bool /*is_most_visited_item_url*/)
636 // Tells InstantExtended to undo all most visited item deletions.
637 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions
,
638 int /* page_seq_no */)
640 // Tells InstantExtended to undo one most visited item deletion.
641 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion
,
642 int /* page_seq_no */,
645 // Tells InstantExtended whether the page supports voice search.
646 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported
,
647 int /* page_seq_no */,
648 bool /* supported */)
650 // Tells the renderer a list of URLs which should be bounced back to the browser
651 // process so that they can be assigned to an Instant renderer.
652 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs
,
653 std::vector
<GURL
> /* search_urls */,
654 GURL
/* new_tab_page_url */)
656 #if defined(ENABLE_PLUGINS)
657 // Sent by the renderer to check if crash reporting is enabled.
658 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled
,