[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / chrome / common / render_messages.h
blob41eff8169282974927272337d9fc62b8566a868b
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.
6 #include <stdint.h>
7 #include <map>
8 #include <set>
9 #include <string>
10 #include <vector>
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 {
48 kAllowed,
49 kBlocked,
50 kBlockedByPolicy,
51 kDisabled,
52 kNotFound,
53 kNPAPINotSupported,
54 kOutdatedBlocked,
55 kOutdatedDisallowed,
56 kPlayImportantContent,
57 kUnauthorized,
60 namespace IPC {
62 template <>
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);
70 } // namespace IPC
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_MAX_VALUE(search_provider::InstallState,
84 search_provider::INSTALLED_STATE_LAST)
85 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment,
86 THEME_BKGRND_IMAGE_ALIGN_LAST)
87 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling, THEME_BKGRND_IMAGE_LAST)
88 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level,
89 blink::WebConsoleMessage::LevelLast)
90 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState,
91 content::TOP_CONTROLS_STATE_LAST)
93 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
94 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output)
95 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status)
96 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin)
97 IPC_STRUCT_MEMBER(std::string, actual_mime_type)
98 IPC_STRUCT_MEMBER(std::string, group_identifier)
99 IPC_STRUCT_MEMBER(base::string16, group_name)
100 IPC_STRUCT_END()
102 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts)
103 IPC_STRUCT_TRAITS_MEMBER(scheme)
104 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard)
105 IPC_STRUCT_TRAITS_MEMBER(host)
106 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard)
107 IPC_STRUCT_TRAITS_MEMBER(port)
108 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard)
109 IPC_STRUCT_TRAITS_MEMBER(path)
110 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard)
111 IPC_STRUCT_TRAITS_END()
113 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
114 IPC_STRUCT_TRAITS_MEMBER(primary_pattern)
115 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern)
116 IPC_STRUCT_TRAITS_MEMBER(setting)
117 IPC_STRUCT_TRAITS_MEMBER(source)
118 IPC_STRUCT_TRAITS_MEMBER(incognito)
119 IPC_STRUCT_TRAITS_END()
121 IPC_STRUCT_TRAITS_BEGIN(EmbeddedSearchRequestParams)
122 IPC_STRUCT_TRAITS_MEMBER(search_query)
123 IPC_STRUCT_TRAITS_MEMBER(original_query)
124 IPC_STRUCT_TRAITS_MEMBER(rlz_parameter_value)
125 IPC_STRUCT_TRAITS_MEMBER(input_encoding)
126 IPC_STRUCT_TRAITS_MEMBER(assisted_query_stats)
127 IPC_STRUCT_TRAITS_END()
129 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion)
130 IPC_STRUCT_TRAITS_MEMBER(text)
131 IPC_STRUCT_TRAITS_MEMBER(metadata)
132 IPC_STRUCT_TRAITS_END()
134 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem)
135 IPC_STRUCT_TRAITS_MEMBER(url)
136 IPC_STRUCT_TRAITS_MEMBER(title)
137 IPC_STRUCT_TRAITS_END()
139 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
140 IPC_STRUCT_TRAITS_MEMBER(image_rules)
141 IPC_STRUCT_TRAITS_MEMBER(script_rules)
142 IPC_STRUCT_TRAITS_END()
144 IPC_STRUCT_TRAITS_BEGIN(RGBAColor)
145 IPC_STRUCT_TRAITS_MEMBER(r)
146 IPC_STRUCT_TRAITS_MEMBER(g)
147 IPC_STRUCT_TRAITS_MEMBER(b)
148 IPC_STRUCT_TRAITS_MEMBER(a)
149 IPC_STRUCT_TRAITS_END()
151 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo)
152 IPC_STRUCT_TRAITS_MEMBER(using_default_theme)
153 IPC_STRUCT_TRAITS_MEMBER(background_color)
154 IPC_STRUCT_TRAITS_MEMBER(text_color)
155 IPC_STRUCT_TRAITS_MEMBER(link_color)
156 IPC_STRUCT_TRAITS_MEMBER(text_color_light)
157 IPC_STRUCT_TRAITS_MEMBER(header_color)
158 IPC_STRUCT_TRAITS_MEMBER(section_border_color)
159 IPC_STRUCT_TRAITS_MEMBER(theme_id)
160 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment)
161 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment)
162 IPC_STRUCT_TRAITS_MEMBER(image_tiling)
163 IPC_STRUCT_TRAITS_MEMBER(image_height)
164 IPC_STRUCT_TRAITS_MEMBER(has_attribution)
165 IPC_STRUCT_TRAITS_MEMBER(logo_alternate)
166 IPC_STRUCT_TRAITS_END()
168 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats)
169 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
170 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
171 IPC_STRUCT_TRAITS_MEMBER(capacity)
172 IPC_STRUCT_TRAITS_MEMBER(liveSize)
173 IPC_STRUCT_TRAITS_MEMBER(deadSize)
174 IPC_STRUCT_TRAITS_END()
176 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType,
177 NTP_EVENT_TYPE_LAST)
179 IPC_ENUM_TRAITS_MAX_VALUE(WebApplicationInfo::MobileCapable,
180 WebApplicationInfo::MOBILE_CAPABLE_APPLE)
182 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo)
183 IPC_STRUCT_TRAITS_MEMBER(url)
184 IPC_STRUCT_TRAITS_MEMBER(width)
185 IPC_STRUCT_TRAITS_MEMBER(height)
186 IPC_STRUCT_TRAITS_MEMBER(data)
187 IPC_STRUCT_TRAITS_END()
189 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo)
190 IPC_STRUCT_TRAITS_MEMBER(title)
191 IPC_STRUCT_TRAITS_MEMBER(description)
192 IPC_STRUCT_TRAITS_MEMBER(app_url)
193 IPC_STRUCT_TRAITS_MEMBER(icons)
194 IPC_STRUCT_TRAITS_MEMBER(mobile_capable)
195 IPC_STRUCT_TRAITS_END()
197 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebAppBannerPromptReply,
198 blink::WebAppBannerPromptReply::Cancel)
200 //-----------------------------------------------------------------------------
201 // RenderView messages
202 // These are messages sent from the browser to the renderer process.
204 #if !defined(OS_ANDROID) && !defined(OS_IOS)
205 // For WebUI testing, this message requests JavaScript to be executed at a time
206 // which is late enough to not be thrown out, and early enough to be before
207 // onload events are fired.
208 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript,
209 base::string16 /* javascript */)
210 #endif
212 // Set the content setting rules stored by the renderer.
213 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
214 RendererContentSettingRules /* rules */)
216 // Tells the renderer to create a FieldTrial, and by using a 100% probability
217 // for the FieldTrial, forces the FieldTrial to have assigned group name.
218 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup,
219 std::string /* field trial name */,
220 std::string /* group name that was assigned. */)
222 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetPageSequenceNumber,
223 int /* page_seq_no */)
225 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant)
227 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults,
228 bool /* display_instant_results */)
230 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged,
231 OmniboxFocusState /* new_focus_state */,
232 OmniboxFocusChangeReason /* reason */)
234 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMarginChange, int /* start */)
236 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged,
237 std::vector<InstantMostVisitedItem> /* items */)
239 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation,
240 bool /* is_app_launcher_enabled */)
242 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress,
243 bool /* input_in_progress */)
245 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch,
246 InstantSuggestion /* suggestion */)
248 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxSubmit,
249 base::string16 /* value */,
250 EmbeddedSearchRequestParams /* params */)
252 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged,
253 ThemeBackgroundInfo /* value */)
255 IPC_MESSAGE_ROUTED1(ChromeViewMsg_HistorySyncCheckResult,
256 bool /* sync_history */)
258 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult,
259 base::string16 /* identity */,
260 bool /* identity_match */)
262 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch)
264 // Sent on process startup to indicate whether this process is running in
265 // incognito mode.
266 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
267 bool /* is_incognito_processs */)
269 // Sent when the profile changes the kSafeBrowsingEnabled preference.
270 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
271 bool /* enable_phishing_detection */)
273 // Reloads the image selected by the most recently opened context menu
274 // (if there indeed is an image at that location).
275 IPC_MESSAGE_ROUTED0(ChromeViewMsg_RequestReloadImageForContextNode)
277 // Asks the renderer for a thumbnail of the image selected by the most
278 // recently opened context menu, if there is one. If the image's area
279 // is greater than thumbnail_min_area it will be downscaled to
280 // be within thumbnail_max_size. The possibly downsampled image will be
281 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
282 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode,
283 int /* thumbnail_min_area_pixels */,
284 gfx::Size /* thumbnail_max_size_pixels */)
286 // Notifies the renderer whether hiding/showing the top controls is enabled,
287 // what the current state should be, and whether or not to animate to the
288 // proper state.
289 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState,
290 content::TopControlsState /* constraints */,
291 content::TopControlsState /* current */,
292 bool /* animate */)
295 // Updates the window features of the render view.
296 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures,
297 blink::WebWindowFeatures /* window_features */)
299 // Responds to the request for a thumbnail.
300 // Thumbnail data will be empty is a thumbnail could not be produced.
301 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK,
302 std::string /* JPEG-encoded thumbnail data */,
303 gfx::Size /* original size of the image */)
305 // Requests application info for the page. The renderer responds back with
306 // ChromeViewHostMsg_DidGetWebApplicationInfo.
307 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetWebApplicationInfo)
309 #if defined(OS_ANDROID)
310 // Asks the renderer to return information about the given meta tag.
311 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RetrieveMetaTagContent,
312 GURL /* expected_url */,
313 std::string /* tag_name */ )
314 #endif // defined(OS_ANDROID)
316 // chrome.principals messages ------------------------------------------------
318 // Message sent from the renderer to the browser to get the list of browser
319 // managed accounts for the given origin.
320 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts,
321 GURL /* current URL */,
322 std::vector<std::string> /* managed accounts */)
324 // Message sent from the renderer to the browser to show the browser account
325 // management UI.
326 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI)
328 // JavaScript related messages -----------------------------------------------
330 // Provides the renderer with the results of the browser's investigation into
331 // why a recent main frame load failed (currently, just DNS probe result).
332 // NetErrorHelper will receive this mesage and replace or update the error
333 // page with more specific troubleshooting suggestions.
334 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo,
335 int /* DNS probe status */)
337 // Provides the information needed by the renderer process to contact a
338 // navigation correction service. Handled by the NetErrorHelper.
339 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo,
340 GURL /* Navigation correction service base URL */,
341 std::string /* language */,
342 std::string /* origin_country */,
343 std::string /* API key to use */,
344 GURL /* Google Search URL to use */)
346 //-----------------------------------------------------------------------------
347 // Misc messages
348 // These are messages sent from the renderer to the browser process.
350 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats,
351 blink::WebCache::UsageStats /* stats */)
353 // Sent by the renderer process to check whether access to FileSystem is
354 // granted by content settings.
355 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_RequestFileSystemAccessSync,
356 int /* render_frame_id */,
357 GURL /* origin_url */,
358 GURL /* top origin url */,
359 bool /* allowed */)
361 // Return information about a plugin for the given URL and MIME type.
362 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
363 // about specific reasons why a plugin can't be used, for example because it's
364 // disabled.
365 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo,
366 int /* render_frame_id */,
367 GURL /* url */,
368 GURL /* top origin url */,
369 std::string /* mime_type */,
370 ChromeViewHostMsg_GetPluginInfo_Output /* output */)
372 #if defined(ENABLE_PEPPER_CDMS)
373 // Returns whether any internal plugin supporting |mime_type| is registered and
374 // enabled. Does not determine whether the plugin can actually be instantiated
375 // (e.g. whether it has all its dependencies).
376 // When the returned *|is_available| is true, |additional_param_names| and
377 // |additional_param_values| contain the name-value pairs, if any, specified
378 // for the *first* non-disabled plugin found that is registered for |mime_type|.
379 IPC_SYNC_MESSAGE_CONTROL1_3(
380 ChromeViewHostMsg_IsInternalPluginAvailableForMimeType,
381 std::string /* mime_type */,
382 bool /* is_available */,
383 std::vector<base::string16> /* additional_param_names */,
384 std::vector<base::string16> /* additional_param_values */)
385 #endif
387 #if defined(ENABLE_PLUGIN_INSTALLATION)
388 // Notifies the browser that a missing plugin placeholder has been removed, so
389 // the corresponding PluginPlaceholderHost can be deleted.
390 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost,
391 int /* placeholder_id */)
393 // Notifies a missing plugin placeholder that a plugin with name |plugin_name|
394 // has been found.
395 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin,
396 base::string16 /* plugin_name */)
398 // Notifies a missing plugin placeholder that no plugin has been found.
399 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin)
401 // Notifies a missing plugin placeholder that we have started downloading
402 // the plugin.
403 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin)
405 // Notifies a missing plugin placeholder that we have finished downloading
406 // the plugin.
407 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin)
409 // Notifies a missing plugin placeholder that there was an error downloading
410 // the plugin.
411 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin,
412 std::string /* message */)
413 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
415 // Notifies a missing plugin placeholder that the user cancelled downloading
416 // the plugin.
417 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin)
419 // Tells the browser to open chrome://plugins in a new tab. We use a separate
420 // message because renderer processes aren't allowed to directly navigate to
421 // chrome:// URLs.
422 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins)
424 // Tells the browser that there was an error loading a plugin.
425 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin,
426 base::FilePath /* plugin_path */)
428 // Tells the browser that we blocked a plugin because NPAPI is not supported.
429 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported,
430 std::string /* identifer */)
432 // Asks the renderer whether an app banner should be shown. It will reply with
433 // ChromeViewHostMsg_AppBannerPromptReply.
434 IPC_MESSAGE_ROUTED2(ChromeViewMsg_AppBannerPromptRequest,
435 int /* request_id */,
436 std::string /* platform */)
438 // Tells the renderer that a banner has been accepted.
439 IPC_MESSAGE_ROUTED2(ChromeViewMsg_AppBannerAccepted,
440 int32_t /* request_id */,
441 std::string /* platform */)
443 // Tells the renderer that a banner has been dismissed.
444 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AppBannerDismissed,
445 int32_t /* request_id */)
447 // Asks the renderer to log a debug message to console regarding an
448 // app banner.
449 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AppBannerDebugMessageRequest,
450 std::string /* message */)
452 // Notification that the page has an OpenSearch description document
453 // associated with it.
454 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD,
455 GURL /* page_url */,
456 GURL /* osdd_url */,
457 search_provider::OSDDType)
459 // Find out if the given url's security origin is installed as a search
460 // provider.
461 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState,
462 GURL /* page url */,
463 GURL /* inquiry url */,
464 search_provider::InstallState /* install */)
466 // Notifies when a plugin couldn't be loaded because it's outdated.
467 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin,
468 int /* placeholder ID */,
469 std::string /* plugin group identifier */)
471 // Notifies when a plugin couldn't be loaded because it requires
472 // user authorization.
473 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin,
474 base::string16 /* name */,
475 std::string /* plugin group identifier */)
477 // Message sent from the renderer to the browser to notify it of a
478 // window.print() call which should cancel the prerender. The message is sent
479 // only when the renderer is prerendering.
480 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
482 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_DidGetWebApplicationInfo,
483 WebApplicationInfo)
485 #if defined(OS_ANDROID)
486 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveMetaTagContent,
487 bool /* success */,
488 std::string /* tag_name */,
489 std::string /* tag_content */,
490 GURL /* expected_url */)
491 #endif // defined(OS_ANDROID)
493 // Logs events from InstantExtended New Tab Pages.
494 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogEvent,
495 int /* page_seq_no */,
496 NTPLoggingEventType /* event */,
497 base::TimeDelta /* time */)
499 // Logs an impression on one of the Most Visited tile on the InstantExtended
500 // New Tab Page.
501 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression,
502 int /* page_seq_no */,
503 int /* position */,
504 base::string16 /* provider */)
506 // Logs a navigation on one of the Most Visited tile on the InstantExtended
507 // New Tab Page.
508 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation,
509 int /* page_seq_no */,
510 int /* position */,
511 base::string16 /* provider */)
513 // The Instant page asks whether the user syncs its history.
514 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_HistorySyncCheck,
515 int /* page_seq_no */)
517 // The Instant page asks for Chrome identity check against |identity|.
518 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck,
519 int /* page_seq_no */,
520 base::string16 /* identity */)
522 // Tells InstantExtended to set the omnibox focus state.
523 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox,
524 int /* page_seq_no */,
525 OmniboxFocusState /* state */)
527 // Tells InstantExtended to paste text into the omnibox. If text is empty,
528 // the clipboard contents will be pasted. This causes the omnibox dropdown to
529 // open.
530 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown,
531 int /* page_seq_no */,
532 base::string16 /* text to be pasted */)
534 // Tells InstantExtended whether the embedded search API is supported.
535 // See http://dev.chromium.org/embeddedsearch
536 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
537 int /* page_seq_no */,
538 bool /* result */)
540 // Tells InstantExtended to delete a most visited item.
541 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem,
542 int /* page_seq_no */,
543 GURL /* url */)
545 // Tells InstantExtended to navigate the active tab to a possibly privileged
546 // URL.
547 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate,
548 int /* page_seq_no */,
549 GURL /* destination */,
550 WindowOpenDisposition /* disposition */,
551 bool /*is_most_visited_item_url*/)
553 // Tells InstantExtended to undo all most visited item deletions.
554 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions,
555 int /* page_seq_no */)
557 // Tells InstantExtended to undo one most visited item deletion.
558 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion,
559 int /* page_seq_no */,
560 GURL /* url */)
562 // Tells InstantExtended whether the page supports voice search.
563 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported,
564 int /* page_seq_no */,
565 bool /* supported */)
567 // Tells the renderer a list of URLs which should be bounced back to the browser
568 // process so that they can be assigned to an Instant renderer.
569 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs,
570 std::vector<GURL> /* search_urls */,
571 GURL /* new_tab_page_url */)
573 #if defined(ENABLE_PLUGINS)
574 // Sent by the renderer to check if crash reporting is enabled.
575 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled,
576 bool /* enabled */)
577 #endif
579 // Tells the browser process whether the web page wants the banner to be shown.
580 // This is a reply from ChromeViewMsg_AppBannerPromptRequest.
581 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_AppBannerPromptReply,
582 int /* request_id */,
583 blink::WebAppBannerPromptReply /* reply */)
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 */)