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.
10 #include "base/files/file_path.h"
11 #include "base/strings/string16.h"
12 #include "base/time/time.h"
13 #include "chrome/common/common_param_traits.h"
14 #include "chrome/common/instant_types.h"
15 #include "chrome/common/ntp_logging_events.h"
16 #include "chrome/common/search_provider.h"
17 #include "chrome/common/web_application_info.h"
18 #include "components/omnibox/common/omnibox_focus_state.h"
19 #include "content/public/common/common_param_traits.h"
20 #include "content/public/common/top_controls_state.h"
21 #include "ipc/ipc_channel_handle.h"
22 #include "ipc/ipc_message_macros.h"
23 #include "ipc/ipc_platform_file.h"
24 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerPromptReply.h"
25 #include "third_party/WebKit/public/web/WebCache.h"
26 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
28 // Singly-included section for enums and custom IPC traits.
29 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
30 #define CHROME_COMMON_RENDER_MESSAGES_H_
32 enum class ChromeViewHostMsg_GetPluginInfo_Status
{
41 kPlayImportantContent
,
48 struct ParamTraits
<ContentSettingsPattern
> {
49 typedef ContentSettingsPattern param_type
;
50 static void Write(Message
* m
, const param_type
& p
);
51 static bool Read(const Message
* m
, base::PickleIterator
* iter
, param_type
* r
);
52 static void Log(const param_type
& p
, std::string
* l
);
57 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
59 #define IPC_MESSAGE_START ChromeMsgStart
61 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status
,
62 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized
)
63 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusChangeReason
,
64 OMNIBOX_FOCUS_CHANGE_REASON_LAST
)
65 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState
, OMNIBOX_FOCUS_STATE_LAST
)
66 IPC_ENUM_TRAITS_MAX_VALUE(search_provider::OSDDType
,
67 search_provider::OSDD_TYPE_LAST
)
68 IPC_ENUM_TRAITS_MIN_MAX_VALUE(search_provider::InstallState
,
69 search_provider::DENIED
,
70 search_provider::INSTALLED_STATE_LAST
)
71 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment
,
72 THEME_BKGRND_IMAGE_ALIGN_LAST
)
73 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling
, THEME_BKGRND_IMAGE_LAST
)
74 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level
,
75 blink::WebConsoleMessage::LevelLast
)
76 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState
,
77 content::TOP_CONTROLS_STATE_LAST
)
79 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
80 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output
)
81 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status
, status
)
82 IPC_STRUCT_MEMBER(content::WebPluginInfo
, plugin
)
83 IPC_STRUCT_MEMBER(std::string
, actual_mime_type
)
84 IPC_STRUCT_MEMBER(std::string
, group_identifier
)
85 IPC_STRUCT_MEMBER(base::string16
, group_name
)
88 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts
)
89 IPC_STRUCT_TRAITS_MEMBER(scheme
)
90 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard
)
91 IPC_STRUCT_TRAITS_MEMBER(host
)
92 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard
)
93 IPC_STRUCT_TRAITS_MEMBER(port
)
94 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard
)
95 IPC_STRUCT_TRAITS_MEMBER(path
)
96 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard
)
97 IPC_STRUCT_TRAITS_END()
99 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource
)
100 IPC_STRUCT_TRAITS_MEMBER(primary_pattern
)
101 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern
)
102 IPC_STRUCT_TRAITS_MEMBER(setting
)
103 IPC_STRUCT_TRAITS_MEMBER(source
)
104 IPC_STRUCT_TRAITS_MEMBER(incognito
)
105 IPC_STRUCT_TRAITS_END()
107 IPC_STRUCT_TRAITS_BEGIN(EmbeddedSearchRequestParams
)
108 IPC_STRUCT_TRAITS_MEMBER(search_query
)
109 IPC_STRUCT_TRAITS_MEMBER(original_query
)
110 IPC_STRUCT_TRAITS_MEMBER(rlz_parameter_value
)
111 IPC_STRUCT_TRAITS_MEMBER(input_encoding
)
112 IPC_STRUCT_TRAITS_MEMBER(assisted_query_stats
)
113 IPC_STRUCT_TRAITS_END()
115 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion
)
116 IPC_STRUCT_TRAITS_MEMBER(text
)
117 IPC_STRUCT_TRAITS_MEMBER(metadata
)
118 IPC_STRUCT_TRAITS_END()
120 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem
)
121 IPC_STRUCT_TRAITS_MEMBER(url
)
122 IPC_STRUCT_TRAITS_MEMBER(title
)
123 IPC_STRUCT_TRAITS_MEMBER(thumbnail
)
124 IPC_STRUCT_TRAITS_MEMBER(favicon
)
125 IPC_STRUCT_TRAITS_END()
127 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules
)
128 IPC_STRUCT_TRAITS_MEMBER(image_rules
)
129 IPC_STRUCT_TRAITS_MEMBER(script_rules
)
130 IPC_STRUCT_TRAITS_END()
132 IPC_STRUCT_TRAITS_BEGIN(RGBAColor
)
133 IPC_STRUCT_TRAITS_MEMBER(r
)
134 IPC_STRUCT_TRAITS_MEMBER(g
)
135 IPC_STRUCT_TRAITS_MEMBER(b
)
136 IPC_STRUCT_TRAITS_MEMBER(a
)
137 IPC_STRUCT_TRAITS_END()
139 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo
)
140 IPC_STRUCT_TRAITS_MEMBER(using_default_theme
)
141 IPC_STRUCT_TRAITS_MEMBER(background_color
)
142 IPC_STRUCT_TRAITS_MEMBER(text_color
)
143 IPC_STRUCT_TRAITS_MEMBER(link_color
)
144 IPC_STRUCT_TRAITS_MEMBER(text_color_light
)
145 IPC_STRUCT_TRAITS_MEMBER(header_color
)
146 IPC_STRUCT_TRAITS_MEMBER(section_border_color
)
147 IPC_STRUCT_TRAITS_MEMBER(theme_id
)
148 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment
)
149 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment
)
150 IPC_STRUCT_TRAITS_MEMBER(image_tiling
)
151 IPC_STRUCT_TRAITS_MEMBER(image_height
)
152 IPC_STRUCT_TRAITS_MEMBER(has_attribution
)
153 IPC_STRUCT_TRAITS_MEMBER(logo_alternate
)
154 IPC_STRUCT_TRAITS_END()
156 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats
)
157 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity
)
158 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity
)
159 IPC_STRUCT_TRAITS_MEMBER(capacity
)
160 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
161 IPC_STRUCT_TRAITS_MEMBER(deadSize
)
162 IPC_STRUCT_TRAITS_END()
164 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType
,
167 IPC_ENUM_TRAITS_MAX_VALUE(WebApplicationInfo::MobileCapable
,
168 WebApplicationInfo::MOBILE_CAPABLE_APPLE
)
170 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo
)
171 IPC_STRUCT_TRAITS_MEMBER(url
)
172 IPC_STRUCT_TRAITS_MEMBER(width
)
173 IPC_STRUCT_TRAITS_MEMBER(height
)
174 IPC_STRUCT_TRAITS_MEMBER(data
)
175 IPC_STRUCT_TRAITS_END()
177 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo
)
178 IPC_STRUCT_TRAITS_MEMBER(title
)
179 IPC_STRUCT_TRAITS_MEMBER(description
)
180 IPC_STRUCT_TRAITS_MEMBER(app_url
)
181 IPC_STRUCT_TRAITS_MEMBER(icons
)
182 IPC_STRUCT_TRAITS_MEMBER(mobile_capable
)
183 IPC_STRUCT_TRAITS_END()
185 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebAppBannerPromptReply
,
186 blink::WebAppBannerPromptReply::Cancel
)
188 //-----------------------------------------------------------------------------
189 // RenderView messages
190 // These are messages sent from the browser to the renderer process.
192 #if !defined(OS_ANDROID) && !defined(OS_IOS)
193 // For WebUI testing, this message requests JavaScript to be executed at a time
194 // which is late enough to not be thrown out, and early enough to be before
195 // onload events are fired.
196 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript
,
197 base::string16
/* javascript */)
200 // Set the content setting rules stored by the renderer.
201 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules
,
202 RendererContentSettingRules
/* rules */)
204 // Tells the renderer to create a FieldTrial, and by using a 100% probability
205 // for the FieldTrial, forces the FieldTrial to have assigned group name.
206 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup
,
207 std::string
/* field trial name */,
208 std::string
/* group name that was assigned. */)
210 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetPageSequenceNumber
,
211 int /* page_seq_no */)
213 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant
)
215 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults
,
216 bool /* display_instant_results */)
218 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged
,
219 OmniboxFocusState
/* new_focus_state */,
220 OmniboxFocusChangeReason
/* reason */)
222 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMarginChange
, int /* start */)
224 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged
,
225 std::vector
<InstantMostVisitedItem
> /* items */)
227 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation
,
228 bool /* is_app_launcher_enabled */)
230 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress
,
231 bool /* input_in_progress */)
233 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch
,
234 InstantSuggestion
/* suggestion */)
236 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxSubmit
,
237 base::string16
/* value */,
238 EmbeddedSearchRequestParams
/* params */)
240 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged
,
241 ThemeBackgroundInfo
/* value */)
243 IPC_MESSAGE_ROUTED1(ChromeViewMsg_HistorySyncCheckResult
,
244 bool /* sync_history */)
246 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult
,
247 base::string16
/* identity */,
248 bool /* identity_match */)
250 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch
)
252 // Sent on process startup to indicate whether this process is running in
254 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess
,
255 bool /* is_incognito_processs */)
257 // Sent when the profile changes the kSafeBrowsingEnabled preference.
258 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection
,
259 bool /* enable_phishing_detection */)
261 // Reloads the image selected by the most recently opened context menu
262 // (if there indeed is an image at that location).
263 IPC_MESSAGE_ROUTED0(ChromeViewMsg_RequestReloadImageForContextNode
)
265 // Asks the renderer for a thumbnail of the image selected by the most
266 // recently opened context menu, if there is one. If the image's area
267 // is greater than thumbnail_min_area it will be downscaled to
268 // be within thumbnail_max_size. The possibly downsampled image will be
269 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
270 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode
,
271 int /* thumbnail_min_area_pixels */,
272 gfx::Size
/* thumbnail_max_size_pixels */)
274 // Notifies the renderer whether hiding/showing the top controls is enabled,
275 // what the current state should be, and whether or not to animate to the
277 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState
,
278 content::TopControlsState
/* constraints */,
279 content::TopControlsState
/* current */,
283 // Updates the window features of the render view.
284 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures
,
285 blink::WebWindowFeatures
/* window_features */)
287 // Responds to the request for a thumbnail.
288 // Thumbnail data will be empty is a thumbnail could not be produced.
289 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK
,
290 std::string
/* JPEG-encoded thumbnail data */,
291 gfx::Size
/* original size of the image */)
293 // Requests application info for the page. The renderer responds back with
294 // ChromeViewHostMsg_DidGetWebApplicationInfo.
295 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetWebApplicationInfo
)
297 #if defined(OS_ANDROID)
298 // Asks the renderer to return information about the given meta tag.
299 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RetrieveMetaTagContent
,
300 GURL
/* expected_url */,
301 std::string
/* tag_name */ )
302 #endif // defined(OS_ANDROID)
304 // chrome.principals messages ------------------------------------------------
306 // Message sent from the renderer to the browser to get the list of browser
307 // managed accounts for the given origin.
308 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts
,
309 GURL
/* current URL */,
310 std::vector
<std::string
> /* managed accounts */)
312 // Message sent from the renderer to the browser to show the browser account
314 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI
)
316 // JavaScript related messages -----------------------------------------------
318 // Provides the renderer with the results of the browser's investigation into
319 // why a recent main frame load failed (currently, just DNS probe result).
320 // NetErrorHelper will receive this mesage and replace or update the error
321 // page with more specific troubleshooting suggestions.
322 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo
,
323 int /* DNS probe status */)
325 // Tells the renderer whether or not there is a local diagnostics service that
326 // can be run via ChromeViewHostMsg_RunNetworkDiagnostics messages.
327 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetCanShowNetworkDiagnosticsDialog
,
328 bool /* can_show_network_diagnostics_dialog */)
330 // Provides the information needed by the renderer process to contact a
331 // navigation correction service. Handled by the NetErrorHelper.
332 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo
,
333 GURL
/* Navigation correction service base URL */,
334 std::string
/* language */,
335 std::string
/* origin_country */,
336 std::string
/* API key to use */,
337 GURL
/* Google Search URL to use */)
339 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RunNetworkDiagnostics
,
340 GURL
/* failed_url */)
342 //-----------------------------------------------------------------------------
344 // These are messages sent from the renderer to the browser process.
346 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats
,
347 blink::WebCache::UsageStats
/* stats */)
349 // Sent by the renderer process to check whether access to FileSystem is
350 // granted by content settings.
351 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_RequestFileSystemAccessSync
,
352 int /* render_frame_id */,
353 GURL
/* origin_url */,
354 GURL
/* top origin url */,
357 // Return information about a plugin for the given URL and MIME type.
358 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
359 // about specific reasons why a plugin can't be used, for example because it's
361 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo
,
362 int /* render_frame_id */,
364 GURL
/* top origin url */,
365 std::string
/* mime_type */,
366 ChromeViewHostMsg_GetPluginInfo_Output
/* output */)
368 #if defined(ENABLE_PEPPER_CDMS)
369 // Returns whether any internal plugin supporting |mime_type| is registered and
370 // enabled. Does not determine whether the plugin can actually be instantiated
371 // (e.g. whether it has all its dependencies).
372 // When the returned *|is_available| is true, |additional_param_names| and
373 // |additional_param_values| contain the name-value pairs, if any, specified
374 // for the *first* non-disabled plugin found that is registered for |mime_type|.
375 IPC_SYNC_MESSAGE_CONTROL1_3(
376 ChromeViewHostMsg_IsInternalPluginAvailableForMimeType
,
377 std::string
/* mime_type */,
378 bool /* is_available */,
379 std::vector
<base::string16
> /* additional_param_names */,
380 std::vector
<base::string16
> /* additional_param_values */)
383 #if defined(ENABLE_PLUGIN_INSTALLATION)
384 // Notifies the browser that a missing plugin placeholder has been removed, so
385 // the corresponding PluginPlaceholderHost can be deleted.
386 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost
,
387 int /* placeholder_id */)
389 // Notifies a missing plugin placeholder that a plugin with name |plugin_name|
391 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin
,
392 base::string16
/* plugin_name */)
394 // Notifies a missing plugin placeholder that no plugin has been found.
395 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin
)
397 // Notifies a missing plugin placeholder that we have started downloading
399 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin
)
401 // Notifies a missing plugin placeholder that we have finished downloading
403 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin
)
405 // Notifies a missing plugin placeholder that there was an error downloading
407 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin
,
408 std::string
/* message */)
409 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
411 // Notifies a missing plugin placeholder that the user cancelled downloading
413 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin
)
415 // Tells the browser to open chrome://plugins in a new tab. We use a separate
416 // message because renderer processes aren't allowed to directly navigate to
418 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins
)
420 // Tells the browser that there was an error loading a plugin.
421 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin
,
422 base::FilePath
/* plugin_path */)
424 // Tells the browser that we blocked a plugin because NPAPI is not supported.
425 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported
,
426 std::string
/* identifer */)
428 // Asks the renderer whether an app banner should be shown. It will reply with
429 // ChromeViewHostMsg_AppBannerPromptReply.
430 IPC_MESSAGE_ROUTED2(ChromeViewMsg_AppBannerPromptRequest
,
431 int /* request_id */,
432 std::string
/* platform */)
434 // Tells the renderer that a banner has been accepted.
435 IPC_MESSAGE_ROUTED2(ChromeViewMsg_AppBannerAccepted
,
436 int32_t /* request_id */,
437 std::string
/* platform */)
439 // Tells the renderer that a banner has been dismissed.
440 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AppBannerDismissed
,
441 int32_t /* request_id */)
443 // Asks the renderer to log a debug message to console regarding an
445 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AppBannerDebugMessageRequest
,
446 std::string
/* message */)
448 // Notification that the page has an OpenSearch description document
449 // associated with it.
450 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD
,
453 search_provider::OSDDType
)
455 // Find out if the given url's security origin is installed as a search
457 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState
,
459 GURL
/* inquiry url */,
460 search_provider::InstallState
/* install */)
462 // Notifies when a plugin couldn't be loaded because it's outdated.
463 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin
,
464 int /* placeholder ID */,
465 std::string
/* plugin group identifier */)
467 // Notifies when a plugin couldn't be loaded because it requires
468 // user authorization.
469 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin
,
470 base::string16
/* name */,
471 std::string
/* plugin group identifier */)
473 // Message sent from the renderer to the browser to notify it of a
474 // window.print() call which should cancel the prerender. The message is sent
475 // only when the renderer is prerendering.
476 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting
)
478 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_DidGetWebApplicationInfo
,
481 #if defined(OS_ANDROID)
482 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveMetaTagContent
,
484 std::string
/* tag_name */,
485 std::string
/* tag_content */,
486 GURL
/* expected_url */)
487 #endif // defined(OS_ANDROID)
489 // Logs events from InstantExtended New Tab Pages.
490 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogEvent
,
491 int /* page_seq_no */,
492 NTPLoggingEventType
/* event */,
493 base::TimeDelta
/* time */)
495 // Logs an impression on one of the Most Visited tile on the InstantExtended
497 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression
,
498 int /* page_seq_no */,
500 base::string16
/* provider */)
502 // Logs a navigation on one of the Most Visited tile on the InstantExtended
504 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation
,
505 int /* page_seq_no */,
507 base::string16
/* provider */)
509 // The Instant page asks whether the user syncs its history.
510 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_HistorySyncCheck
,
511 int /* page_seq_no */)
513 // The Instant page asks for Chrome identity check against |identity|.
514 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck
,
515 int /* page_seq_no */,
516 base::string16
/* identity */)
518 // Tells InstantExtended to set the omnibox focus state.
519 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox
,
520 int /* page_seq_no */,
521 OmniboxFocusState
/* state */)
523 // Tells InstantExtended to paste text into the omnibox. If text is empty,
524 // the clipboard contents will be pasted. This causes the omnibox dropdown to
526 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown
,
527 int /* page_seq_no */,
528 base::string16
/* text to be pasted */)
530 // Tells InstantExtended whether the embedded search API is supported.
531 // See http://dev.chromium.org/embeddedsearch
532 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined
,
533 int /* page_seq_no */,
536 // Tells InstantExtended to delete a most visited item.
537 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem
,
538 int /* page_seq_no */,
541 // Tells InstantExtended to navigate the active tab to a possibly privileged
543 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate
,
544 int /* page_seq_no */,
545 GURL
/* destination */,
546 WindowOpenDisposition
/* disposition */,
547 bool /*is_most_visited_item_url*/)
549 // Tells InstantExtended to undo all most visited item deletions.
550 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions
,
551 int /* page_seq_no */)
553 // Tells InstantExtended to undo one most visited item deletion.
554 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion
,
555 int /* page_seq_no */,
558 // Tells InstantExtended whether the page supports voice search.
559 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported
,
560 int /* page_seq_no */,
561 bool /* supported */)
563 // Tells the renderer a list of URLs which should be bounced back to the browser
564 // process so that they can be assigned to an Instant renderer.
565 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs
,
566 std::vector
<GURL
> /* search_urls */,
567 GURL
/* new_tab_page_url */)
569 #if defined(ENABLE_PLUGINS)
570 // Sent by the renderer to check if crash reporting is enabled.
571 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled
,
575 // Tells the browser process whether the web page wants the banner to be shown.
576 // This is a reply from ChromeViewMsg_AppBannerPromptRequest.
577 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_AppBannerPromptReply
,
578 int /* request_id */,
579 blink::WebAppBannerPromptReply
/* reply */)
581 // Tells the browser to restart the app banner display pipeline.
582 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RequestShowAppBanner
,
583 int32_t /* request_id */)
585 // Sent by the renderer to indicate that a fields trial has been activated.
586 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_FieldTrialActivated
,
587 std::string
/* name */)
589 // Record a sample string to a Rappor metric.
590 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRappor
,
591 std::string
/* metric */,
592 std::string
/* sample */)
594 // Record a domain and registry of a url to a Rappor metric.
595 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRapporURL
,
596 std::string
/* metric */,
597 GURL
/* sample url */)