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/time/time.h"
18 #include "base/values.h"
19 #include "build/build_config.h"
20 #include "chrome/common/common_param_traits.h"
21 #include "chrome/common/instant_types.h"
22 #include "chrome/common/ntp_logging_events.h"
23 #include "chrome/common/omnibox_focus_state.h"
24 #include "chrome/common/search_provider.h"
25 #include "chrome/common/web_application_info.h"
26 #include "components/content_settings/core/common/content_settings.h"
27 #include "components/content_settings/core/common/content_settings_pattern.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/platform/modules/app_banner/WebAppBannerPromptReply.h"
36 #include "third_party/WebKit/public/web/WebCache.h"
37 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
38 #include "third_party/skia/include/core/SkBitmap.h"
39 #include "ui/base/window_open_disposition.h"
40 #include "ui/gfx/geometry/rect.h"
41 #include "ui/gfx/ipc/gfx_param_traits.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_
47 enum class ChromeViewHostMsg_GetPluginInfo_Status
{
56 kPlayImportantContent
,
63 struct ParamTraits
<ContentSettingsPattern
> {
64 typedef ContentSettingsPattern param_type
;
65 static void Write(Message
* m
, const param_type
& p
);
66 static bool Read(const Message
* m
, base::PickleIterator
* iter
, param_type
* r
);
67 static void Log(const param_type
& p
, std::string
* l
);
72 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
74 #define IPC_MESSAGE_START ChromeMsgStart
76 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status
,
77 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized
)
78 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusChangeReason
,
79 OMNIBOX_FOCUS_CHANGE_REASON_LAST
)
80 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState
, OMNIBOX_FOCUS_STATE_LAST
)
81 IPC_ENUM_TRAITS_MAX_VALUE(search_provider::OSDDType
,
82 search_provider::OSDD_TYPE_LAST
)
83 IPC_ENUM_TRAITS_MIN_MAX_VALUE(search_provider::InstallState
,
84 search_provider::DENIED
,
85 search_provider::INSTALLED_STATE_LAST
)
86 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment
,
87 THEME_BKGRND_IMAGE_ALIGN_LAST
)
88 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling
, THEME_BKGRND_IMAGE_LAST
)
89 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level
,
90 blink::WebConsoleMessage::LevelLast
)
91 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState
,
92 content::TOP_CONTROLS_STATE_LAST
)
94 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
95 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output
)
96 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status
, status
)
97 IPC_STRUCT_MEMBER(content::WebPluginInfo
, plugin
)
98 IPC_STRUCT_MEMBER(std::string
, actual_mime_type
)
99 IPC_STRUCT_MEMBER(std::string
, group_identifier
)
100 IPC_STRUCT_MEMBER(base::string16
, group_name
)
103 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts
)
104 IPC_STRUCT_TRAITS_MEMBER(scheme
)
105 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard
)
106 IPC_STRUCT_TRAITS_MEMBER(host
)
107 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard
)
108 IPC_STRUCT_TRAITS_MEMBER(port
)
109 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard
)
110 IPC_STRUCT_TRAITS_MEMBER(path
)
111 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard
)
112 IPC_STRUCT_TRAITS_END()
114 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource
)
115 IPC_STRUCT_TRAITS_MEMBER(primary_pattern
)
116 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern
)
117 IPC_STRUCT_TRAITS_MEMBER(setting
)
118 IPC_STRUCT_TRAITS_MEMBER(source
)
119 IPC_STRUCT_TRAITS_MEMBER(incognito
)
120 IPC_STRUCT_TRAITS_END()
122 IPC_STRUCT_TRAITS_BEGIN(EmbeddedSearchRequestParams
)
123 IPC_STRUCT_TRAITS_MEMBER(search_query
)
124 IPC_STRUCT_TRAITS_MEMBER(original_query
)
125 IPC_STRUCT_TRAITS_MEMBER(rlz_parameter_value
)
126 IPC_STRUCT_TRAITS_MEMBER(input_encoding
)
127 IPC_STRUCT_TRAITS_MEMBER(assisted_query_stats
)
128 IPC_STRUCT_TRAITS_END()
130 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion
)
131 IPC_STRUCT_TRAITS_MEMBER(text
)
132 IPC_STRUCT_TRAITS_MEMBER(metadata
)
133 IPC_STRUCT_TRAITS_END()
135 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem
)
136 IPC_STRUCT_TRAITS_MEMBER(url
)
137 IPC_STRUCT_TRAITS_MEMBER(title
)
138 IPC_STRUCT_TRAITS_END()
140 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules
)
141 IPC_STRUCT_TRAITS_MEMBER(image_rules
)
142 IPC_STRUCT_TRAITS_MEMBER(script_rules
)
143 IPC_STRUCT_TRAITS_END()
145 IPC_STRUCT_TRAITS_BEGIN(RGBAColor
)
146 IPC_STRUCT_TRAITS_MEMBER(r
)
147 IPC_STRUCT_TRAITS_MEMBER(g
)
148 IPC_STRUCT_TRAITS_MEMBER(b
)
149 IPC_STRUCT_TRAITS_MEMBER(a
)
150 IPC_STRUCT_TRAITS_END()
152 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo
)
153 IPC_STRUCT_TRAITS_MEMBER(using_default_theme
)
154 IPC_STRUCT_TRAITS_MEMBER(background_color
)
155 IPC_STRUCT_TRAITS_MEMBER(text_color
)
156 IPC_STRUCT_TRAITS_MEMBER(link_color
)
157 IPC_STRUCT_TRAITS_MEMBER(text_color_light
)
158 IPC_STRUCT_TRAITS_MEMBER(header_color
)
159 IPC_STRUCT_TRAITS_MEMBER(section_border_color
)
160 IPC_STRUCT_TRAITS_MEMBER(theme_id
)
161 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment
)
162 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment
)
163 IPC_STRUCT_TRAITS_MEMBER(image_tiling
)
164 IPC_STRUCT_TRAITS_MEMBER(image_height
)
165 IPC_STRUCT_TRAITS_MEMBER(has_attribution
)
166 IPC_STRUCT_TRAITS_MEMBER(logo_alternate
)
167 IPC_STRUCT_TRAITS_END()
169 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats
)
170 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity
)
171 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity
)
172 IPC_STRUCT_TRAITS_MEMBER(capacity
)
173 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
174 IPC_STRUCT_TRAITS_MEMBER(deadSize
)
175 IPC_STRUCT_TRAITS_END()
177 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType
,
180 IPC_ENUM_TRAITS_MAX_VALUE(WebApplicationInfo::MobileCapable
,
181 WebApplicationInfo::MOBILE_CAPABLE_APPLE
)
183 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo
)
184 IPC_STRUCT_TRAITS_MEMBER(url
)
185 IPC_STRUCT_TRAITS_MEMBER(width
)
186 IPC_STRUCT_TRAITS_MEMBER(height
)
187 IPC_STRUCT_TRAITS_MEMBER(data
)
188 IPC_STRUCT_TRAITS_END()
190 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo
)
191 IPC_STRUCT_TRAITS_MEMBER(title
)
192 IPC_STRUCT_TRAITS_MEMBER(description
)
193 IPC_STRUCT_TRAITS_MEMBER(app_url
)
194 IPC_STRUCT_TRAITS_MEMBER(icons
)
195 IPC_STRUCT_TRAITS_MEMBER(mobile_capable
)
196 IPC_STRUCT_TRAITS_END()
198 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebAppBannerPromptReply
,
199 blink::WebAppBannerPromptReply::Cancel
)
201 //-----------------------------------------------------------------------------
202 // RenderView messages
203 // These are messages sent from the browser to the renderer process.
205 #if !defined(OS_ANDROID) && !defined(OS_IOS)
206 // For WebUI testing, this message requests JavaScript to be executed at a time
207 // which is late enough to not be thrown out, and early enough to be before
208 // onload events are fired.
209 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript
,
210 base::string16
/* javascript */)
213 // Set the content setting rules stored by the renderer.
214 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules
,
215 RendererContentSettingRules
/* rules */)
217 // Tells the renderer to create a FieldTrial, and by using a 100% probability
218 // for the FieldTrial, forces the FieldTrial to have assigned group name.
219 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup
,
220 std::string
/* field trial name */,
221 std::string
/* group name that was assigned. */)
223 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetPageSequenceNumber
,
224 int /* page_seq_no */)
226 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant
)
228 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults
,
229 bool /* display_instant_results */)
231 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged
,
232 OmniboxFocusState
/* new_focus_state */,
233 OmniboxFocusChangeReason
/* reason */)
235 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMarginChange
, int /* start */)
237 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged
,
238 std::vector
<InstantMostVisitedItem
> /* items */)
240 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation
,
241 bool /* is_app_launcher_enabled */)
243 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress
,
244 bool /* input_in_progress */)
246 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch
,
247 InstantSuggestion
/* suggestion */)
249 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxSubmit
,
250 base::string16
/* value */,
251 EmbeddedSearchRequestParams
/* params */)
253 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged
,
254 ThemeBackgroundInfo
/* value */)
256 IPC_MESSAGE_ROUTED1(ChromeViewMsg_HistorySyncCheckResult
,
257 bool /* sync_history */)
259 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult
,
260 base::string16
/* identity */,
261 bool /* identity_match */)
263 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch
)
265 // Sent on process startup to indicate whether this process is running in
267 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess
,
268 bool /* is_incognito_processs */)
270 // Sent when the profile changes the kSafeBrowsingEnabled preference.
271 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection
,
272 bool /* enable_phishing_detection */)
274 // Reloads the image selected by the most recently opened context menu
275 // (if there indeed is an image at that location).
276 IPC_MESSAGE_ROUTED0(ChromeViewMsg_RequestReloadImageForContextNode
)
278 // Asks the renderer for a thumbnail of the image selected by the most
279 // recently opened context menu, if there is one. If the image's area
280 // is greater than thumbnail_min_area it will be downscaled to
281 // be within thumbnail_max_size. The possibly downsampled image will be
282 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
283 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode
,
284 int /* thumbnail_min_area_pixels */,
285 gfx::Size
/* thumbnail_max_size_pixels */)
287 // Notifies the renderer whether hiding/showing the top controls is enabled,
288 // what the current state should be, and whether or not to animate to the
290 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState
,
291 content::TopControlsState
/* constraints */,
292 content::TopControlsState
/* current */,
296 // Updates the window features of the render view.
297 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures
,
298 blink::WebWindowFeatures
/* window_features */)
300 // Responds to the request for a thumbnail.
301 // Thumbnail data will be empty is a thumbnail could not be produced.
302 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK
,
303 std::string
/* JPEG-encoded thumbnail data */,
304 gfx::Size
/* original size of the image */)
306 // Requests application info for the page. The renderer responds back with
307 // ChromeViewHostMsg_DidGetWebApplicationInfo.
308 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetWebApplicationInfo
)
310 #if defined(OS_ANDROID)
311 // Asks the renderer to return information about the given meta tag.
312 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RetrieveMetaTagContent
,
313 GURL
/* expected_url */,
314 std::string
/* tag_name */ )
315 #endif // defined(OS_ANDROID)
317 // chrome.principals messages ------------------------------------------------
319 // Message sent from the renderer to the browser to get the list of browser
320 // managed accounts for the given origin.
321 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts
,
322 GURL
/* current URL */,
323 std::vector
<std::string
> /* managed accounts */)
325 // Message sent from the renderer to the browser to show the browser account
327 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI
)
329 // JavaScript related messages -----------------------------------------------
331 // Provides the renderer with the results of the browser's investigation into
332 // why a recent main frame load failed (currently, just DNS probe result).
333 // NetErrorHelper will receive this mesage and replace or update the error
334 // page with more specific troubleshooting suggestions.
335 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo
,
336 int /* DNS probe status */)
338 // Provides the information needed by the renderer process to contact a
339 // navigation correction service. Handled by the NetErrorHelper.
340 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo
,
341 GURL
/* Navigation correction service base URL */,
342 std::string
/* language */,
343 std::string
/* origin_country */,
344 std::string
/* API key to use */,
345 GURL
/* Google Search URL to use */)
347 //-----------------------------------------------------------------------------
349 // These are messages sent from the renderer to the browser process.
351 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats
,
352 blink::WebCache::UsageStats
/* stats */)
354 // Sent by the renderer process to check whether access to FileSystem is
355 // granted by content settings.
356 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_RequestFileSystemAccessSync
,
357 int /* render_frame_id */,
358 GURL
/* origin_url */,
359 GURL
/* top origin url */,
362 // Return information about a plugin for the given URL and MIME type.
363 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
364 // about specific reasons why a plugin can't be used, for example because it's
366 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo
,
367 int /* render_frame_id */,
369 GURL
/* top origin url */,
370 std::string
/* mime_type */,
371 ChromeViewHostMsg_GetPluginInfo_Output
/* output */)
373 #if defined(ENABLE_PEPPER_CDMS)
374 // Returns whether any internal plugin supporting |mime_type| is registered and
375 // enabled. Does not determine whether the plugin can actually be instantiated
376 // (e.g. whether it has all its dependencies).
377 // When the returned *|is_available| is true, |additional_param_names| and
378 // |additional_param_values| contain the name-value pairs, if any, specified
379 // for the *first* non-disabled plugin found that is registered for |mime_type|.
380 IPC_SYNC_MESSAGE_CONTROL1_3(
381 ChromeViewHostMsg_IsInternalPluginAvailableForMimeType
,
382 std::string
/* mime_type */,
383 bool /* is_available */,
384 std::vector
<base::string16
> /* additional_param_names */,
385 std::vector
<base::string16
> /* additional_param_values */)
388 #if defined(ENABLE_PLUGIN_INSTALLATION)
389 // Notifies the browser that a missing plugin placeholder has been removed, so
390 // the corresponding PluginPlaceholderHost can be deleted.
391 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost
,
392 int /* placeholder_id */)
394 // Notifies a missing plugin placeholder that a plugin with name |plugin_name|
396 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin
,
397 base::string16
/* plugin_name */)
399 // Notifies a missing plugin placeholder that no plugin has been found.
400 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin
)
402 // Notifies a missing plugin placeholder that we have started downloading
404 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin
)
406 // Notifies a missing plugin placeholder that we have finished downloading
408 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin
)
410 // Notifies a missing plugin placeholder that there was an error downloading
412 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin
,
413 std::string
/* message */)
414 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
416 // Notifies a missing plugin placeholder that the user cancelled downloading
418 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin
)
420 // Tells the browser to open chrome://plugins in a new tab. We use a separate
421 // message because renderer processes aren't allowed to directly navigate to
423 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins
)
425 // Tells the browser that there was an error loading a plugin.
426 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin
,
427 base::FilePath
/* plugin_path */)
429 // Tells the browser that we blocked a plugin because NPAPI is not supported.
430 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported
,
431 std::string
/* identifer */)
433 // Asks the renderer whether an app banner should be shown. It will reply with
434 // ChromeViewHostMsg_AppBannerPromptReply.
435 IPC_MESSAGE_ROUTED2(ChromeViewMsg_AppBannerPromptRequest
,
436 int /* request_id */,
437 std::string
/* platform */)
439 // Tells the renderer that a banner has been accepted.
440 IPC_MESSAGE_ROUTED2(ChromeViewMsg_AppBannerAccepted
,
441 int32_t /* request_id */,
442 std::string
/* platform */)
444 // Tells the renderer that a banner has been dismissed.
445 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AppBannerDismissed
,
446 int32_t /* request_id */)
448 // Asks the renderer to log a debug message to console regarding an
450 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AppBannerDebugMessageRequest
,
451 std::string
/* message */)
453 // Notification that the page has an OpenSearch description document
454 // associated with it.
455 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD
,
458 search_provider::OSDDType
)
460 // Find out if the given url's security origin is installed as a search
462 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState
,
464 GURL
/* inquiry url */,
465 search_provider::InstallState
/* install */)
467 // Notifies when a plugin couldn't be loaded because it's outdated.
468 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin
,
469 int /* placeholder ID */,
470 std::string
/* plugin group identifier */)
472 // Notifies when a plugin couldn't be loaded because it requires
473 // user authorization.
474 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin
,
475 base::string16
/* name */,
476 std::string
/* plugin group identifier */)
478 // Message sent from the renderer to the browser to notify it of a
479 // window.print() call which should cancel the prerender. The message is sent
480 // only when the renderer is prerendering.
481 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting
)
483 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_DidGetWebApplicationInfo
,
486 #if defined(OS_ANDROID)
487 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveMetaTagContent
,
489 std::string
/* tag_name */,
490 std::string
/* tag_content */,
491 GURL
/* expected_url */)
492 #endif // defined(OS_ANDROID)
494 // Logs events from InstantExtended New Tab Pages.
495 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogEvent
,
496 int /* page_seq_no */,
497 NTPLoggingEventType
/* event */,
498 base::TimeDelta
/* time */)
500 // Logs an impression on one of the Most Visited tile on the InstantExtended
502 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression
,
503 int /* page_seq_no */,
505 base::string16
/* provider */)
507 // Logs a navigation on one of the Most Visited tile on the InstantExtended
509 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation
,
510 int /* page_seq_no */,
512 base::string16
/* provider */)
514 // The Instant page asks whether the user syncs its history.
515 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_HistorySyncCheck
,
516 int /* page_seq_no */)
518 // The Instant page asks for Chrome identity check against |identity|.
519 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck
,
520 int /* page_seq_no */,
521 base::string16
/* identity */)
523 // Tells InstantExtended to set the omnibox focus state.
524 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox
,
525 int /* page_seq_no */,
526 OmniboxFocusState
/* state */)
528 // Tells InstantExtended to paste text into the omnibox. If text is empty,
529 // the clipboard contents will be pasted. This causes the omnibox dropdown to
531 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown
,
532 int /* page_seq_no */,
533 base::string16
/* text to be pasted */)
535 // Tells InstantExtended whether the embedded search API is supported.
536 // See http://dev.chromium.org/embeddedsearch
537 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined
,
538 int /* page_seq_no */,
541 // Tells InstantExtended to delete a most visited item.
542 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem
,
543 int /* page_seq_no */,
546 // Tells InstantExtended to navigate the active tab to a possibly privileged
548 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate
,
549 int /* page_seq_no */,
550 GURL
/* destination */,
551 WindowOpenDisposition
/* disposition */,
552 bool /*is_most_visited_item_url*/)
554 // Tells InstantExtended to undo all most visited item deletions.
555 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions
,
556 int /* page_seq_no */)
558 // Tells InstantExtended to undo one most visited item deletion.
559 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion
,
560 int /* page_seq_no */,
563 // Tells InstantExtended whether the page supports voice search.
564 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported
,
565 int /* page_seq_no */,
566 bool /* supported */)
568 // Tells the renderer a list of URLs which should be bounced back to the browser
569 // process so that they can be assigned to an Instant renderer.
570 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs
,
571 std::vector
<GURL
> /* search_urls */,
572 GURL
/* new_tab_page_url */)
574 #if defined(ENABLE_PLUGINS)
575 // Sent by the renderer to check if crash reporting is enabled.
576 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled
,
580 // Tells the browser process whether the web page wants the banner to be shown.
581 // This is a reply from ChromeViewMsg_AppBannerPromptRequest.
582 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_AppBannerPromptReply
,
583 int /* request_id */,
584 blink::WebAppBannerPromptReply
/* reply */)
586 // Tells the browser to restart the app banner display pipeline.
587 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RequestShowAppBanner
,
588 int32_t /* request_id */)
590 // Sent by the renderer to indicate that a fields trial has been activated.
591 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_FieldTrialActivated
,
592 std::string
/* name */)
594 // Record a sample string to a Rappor metric.
595 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRappor
,
596 std::string
/* metric */,
597 std::string
/* sample */)
599 // Record a domain and registry of a url to a Rappor metric.
600 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRapporURL
,
601 std::string
/* metric */,
602 GURL
/* sample url */)