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