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