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/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"
41 // Singly-included section for enums and custom IPC traits.
42 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
43 #define CHROME_COMMON_RENDER_MESSAGES_H_
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
{
61 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed
) {}
68 #if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
70 // TODO(port): this shouldn't exist. However, the plugin stuff is really using
71 // HWNDS (NativeView), and making Windows calls based on them. I've not figured
72 // out the deal with plugins yet.
73 // TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow.
75 struct ParamTraits
<gfx::NativeView
> {
76 typedef gfx::NativeView param_type
;
77 static void Write(Message
* m
, const param_type
& p
) {
81 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* p
) {
87 static void Log(const param_type
& p
, std::string
* l
) {
88 l
->append(base::StringPrintf("<gfx::NativeView>"));
92 #endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID)
95 struct ParamTraits
<ContentSettingsPattern
> {
96 typedef ContentSettingsPattern param_type
;
97 static void Write(Message
* m
, const param_type
& p
);
98 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
99 static void Log(const param_type
& p
, std::string
* l
);
104 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
106 #define IPC_MESSAGE_START ChromeMsgStart
108 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status::Value
,
109 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized
)
110 IPC_ENUM_TRAITS(OmniboxFocusChangeReason
)
111 IPC_ENUM_TRAITS(OmniboxFocusState
)
112 IPC_ENUM_TRAITS(search_provider::OSDDType
)
113 IPC_ENUM_TRAITS(search_provider::InstallState
)
114 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment
)
115 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling
)
116 IPC_ENUM_TRAITS(blink::WebConsoleMessage::Level
)
117 IPC_ENUM_TRAITS(content::TopControlsState
)
119 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status
)
120 IPC_STRUCT_TRAITS_MEMBER(value
)
121 IPC_STRUCT_TRAITS_END()
123 // Output parameters for ChromeViewHostMsg_GetPluginInfo message.
124 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output
)
125 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status
, status
)
126 IPC_STRUCT_MEMBER(content::WebPluginInfo
, plugin
)
127 IPC_STRUCT_MEMBER(std::string
, actual_mime_type
)
128 IPC_STRUCT_MEMBER(std::string
, group_identifier
)
129 IPC_STRUCT_MEMBER(base::string16
, group_name
)
132 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts
)
133 IPC_STRUCT_TRAITS_MEMBER(scheme
)
134 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard
)
135 IPC_STRUCT_TRAITS_MEMBER(host
)
136 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard
)
137 IPC_STRUCT_TRAITS_MEMBER(port
)
138 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard
)
139 IPC_STRUCT_TRAITS_MEMBER(path
)
140 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard
)
141 IPC_STRUCT_TRAITS_END()
143 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource
)
144 IPC_STRUCT_TRAITS_MEMBER(primary_pattern
)
145 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern
)
146 IPC_STRUCT_TRAITS_MEMBER(setting
)
147 IPC_STRUCT_TRAITS_MEMBER(source
)
148 IPC_STRUCT_TRAITS_MEMBER(incognito
)
149 IPC_STRUCT_TRAITS_END()
151 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion
)
152 IPC_STRUCT_TRAITS_MEMBER(text
)
153 IPC_STRUCT_TRAITS_MEMBER(metadata
)
154 IPC_STRUCT_TRAITS_END()
156 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem
)
157 IPC_STRUCT_TRAITS_MEMBER(url
)
158 IPC_STRUCT_TRAITS_MEMBER(title
)
159 IPC_STRUCT_TRAITS_END()
161 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules
)
162 IPC_STRUCT_TRAITS_MEMBER(image_rules
)
163 IPC_STRUCT_TRAITS_MEMBER(script_rules
)
164 IPC_STRUCT_TRAITS_END()
166 IPC_STRUCT_TRAITS_BEGIN(RGBAColor
)
167 IPC_STRUCT_TRAITS_MEMBER(r
)
168 IPC_STRUCT_TRAITS_MEMBER(g
)
169 IPC_STRUCT_TRAITS_MEMBER(b
)
170 IPC_STRUCT_TRAITS_MEMBER(a
)
171 IPC_STRUCT_TRAITS_END()
173 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo
)
174 IPC_STRUCT_TRAITS_MEMBER(using_default_theme
)
175 IPC_STRUCT_TRAITS_MEMBER(background_color
)
176 IPC_STRUCT_TRAITS_MEMBER(text_color
)
177 IPC_STRUCT_TRAITS_MEMBER(link_color
)
178 IPC_STRUCT_TRAITS_MEMBER(text_color_light
)
179 IPC_STRUCT_TRAITS_MEMBER(header_color
)
180 IPC_STRUCT_TRAITS_MEMBER(section_border_color
)
181 IPC_STRUCT_TRAITS_MEMBER(theme_id
)
182 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment
)
183 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment
)
184 IPC_STRUCT_TRAITS_MEMBER(image_tiling
)
185 IPC_STRUCT_TRAITS_MEMBER(image_height
)
186 IPC_STRUCT_TRAITS_MEMBER(has_attribution
)
187 IPC_STRUCT_TRAITS_MEMBER(logo_alternate
)
188 IPC_STRUCT_TRAITS_END()
190 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStat
)
191 IPC_STRUCT_TRAITS_MEMBER(count
)
192 IPC_STRUCT_TRAITS_MEMBER(size
)
193 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
194 IPC_STRUCT_TRAITS_MEMBER(decodedSize
)
195 IPC_STRUCT_TRAITS_END()
197 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::ResourceTypeStats
)
198 IPC_STRUCT_TRAITS_MEMBER(images
)
199 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets
)
200 IPC_STRUCT_TRAITS_MEMBER(scripts
)
201 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets
)
202 IPC_STRUCT_TRAITS_MEMBER(fonts
)
203 IPC_STRUCT_TRAITS_END()
205 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats
)
206 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity
)
207 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity
)
208 IPC_STRUCT_TRAITS_MEMBER(capacity
)
209 IPC_STRUCT_TRAITS_MEMBER(liveSize
)
210 IPC_STRUCT_TRAITS_MEMBER(deadSize
)
211 IPC_STRUCT_TRAITS_END()
213 IPC_STRUCT_TRAITS_BEGIN(extensions::StackFrame
)
214 IPC_STRUCT_TRAITS_MEMBER(line_number
)
215 IPC_STRUCT_TRAITS_MEMBER(column_number
)
216 IPC_STRUCT_TRAITS_MEMBER(source
)
217 IPC_STRUCT_TRAITS_MEMBER(function
)
218 IPC_STRUCT_TRAITS_END()
220 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType
,
223 //-----------------------------------------------------------------------------
224 // RenderView messages
225 // These are messages sent from the browser to the renderer process.
227 // Tells the renderer to set its maximum cache size to the supplied value.
228 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities
,
229 size_t /* min_dead_capacity */,
230 size_t /* max_dead_capacity */,
231 size_t /* capacity */)
233 // Tells the renderer to clear the cache.
234 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache
,
235 bool /* on_navigation */)
237 // Set the top-level frame to the provided name.
238 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetName
,
239 std::string
/* frame_name */)
241 // For WebUI testing, this message requests JavaScript to be executed at a time
242 // which is late enough to not be thrown out, and early enough to be before
243 // onload events are fired.
244 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript
,
245 base::string16
/* javascript */)
247 // Set the content setting rules stored by the renderer.
248 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules
,
249 RendererContentSettingRules
/* rules */)
251 // Tells the render frame to load all blocked plugins with the given identifier.
252 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins
,
253 std::string
/* identifier */)
255 // Asks the renderer to send back stats on the WebCore cache broken down by
257 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats
)
259 // Tells the renderer to create a FieldTrial, and by using a 100% probability
260 // for the FieldTrial, forces the FieldTrial to have assigned group name.
261 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup
,
262 std::string
/* field trial name */,
263 std::string
/* group name that was assigned. */)
265 // Asks the renderer to send back V8 heap stats.
266 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats
)
268 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant
)
270 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults
,
271 bool /* display_instant_results */)
273 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged
,
274 OmniboxFocusState
/* new_focus_state */,
275 OmniboxFocusChangeReason
/* reason */)
277 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMarginChange
, int /* start */)
279 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged
,
280 std::vector
<InstantMostVisitedItem
> /* items */)
282 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation
,
283 bool /* is_app_launcher_enabled */)
285 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress
,
286 bool /* input_in_progress */)
288 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch
,
289 InstantSuggestion
/* suggestion */)
291 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit
,
292 base::string16
/* value */)
294 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged
,
295 ThemeBackgroundInfo
/* value */)
297 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult
,
298 base::string16
/* identity */,
299 bool /* identity_match */)
301 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch
)
303 // Toggles visual muting of the render view area. This is on when a constrained
304 // window is showing.
305 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized
,
306 bool /* deemphazied */)
308 // Sent on process startup to indicate whether this process is running in
310 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess
,
311 bool /* is_incognito_processs */)
313 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
314 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent
,
317 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
318 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent
,
321 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame
)
323 // Tells the renderer whether or not a file system access has been allowed.
324 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestFileSystemAccessAsyncResponse
,
325 int /* request_id */,
328 // Sent when the profile changes the kSafeBrowsingEnabled preference.
329 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection
,
330 bool /* enable_phishing_detection */)
332 // Asks the renderer for a thumbnail of the image selected by the most
333 // recently opened context menu, if there is one. If the image's area
334 // is greater than thumbnail_min_area it will be downscaled to
335 // be within thumbnail_max_size. The possibly downsampled image will be
336 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message.
337 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode
,
338 int /* thumbnail_min_area_pixels */,
339 gfx::Size
/* thumbnail_max_size_pixels */)
341 // Notifies the renderer whether hiding/showing the top controls is enabled,
342 // what the current state should be, and whether or not to animate to the
344 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState
,
345 content::TopControlsState
/* constraints */,
346 content::TopControlsState
/* current */,
350 // Updates the window features of the render view.
351 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures
,
352 blink::WebWindowFeatures
/* window_features */)
354 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK
,
355 SkBitmap
/* thumbnail */,
356 gfx::Size
/* original size of the image */)
358 #if defined(OS_ANDROID)
359 // Asks the renderer to return information about whether the current page can
360 // be treated as a webapp.
361 IPC_MESSAGE_ROUTED1(ChromeViewMsg_RetrieveWebappInformation
,
362 GURL
/* expected_url */)
364 // Asks the renderer to return information about the given meta tag.
365 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RetrieveMetaTagContent
,
366 GURL
/* expected_url */,
367 std::string
/* tag_name */ )
368 #endif // defined(OS_ANDROID)
370 // chrome.principals messages ------------------------------------------------
372 // Message sent from the renderer to the browser to get the list of browser
373 // managed accounts for the given origin.
374 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_GetManagedAccounts
,
375 GURL
/* current URL */,
376 std::vector
<std::string
> /* managed accounts */)
378 // Message sent from the renderer to the browser to show the browser account
380 IPC_MESSAGE_CONTROL0(ChromeViewHostMsg_ShowBrowserAccountManagementUI
)
382 // JavaScript related messages -----------------------------------------------
384 // Asks the renderer to send back FPS.
385 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS
)
387 // Tells the frame it is displaying an interstitial page.
388 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial
)
390 // Provides the renderer with the results of the browser's investigation into
391 // why a recent main frame load failed (currently, just DNS probe result).
392 // NetErrorHelper will receive this mesage and replace or update the error
393 // page with more specific troubleshooting suggestions.
394 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo
,
395 int /* DNS probe status */)
397 // Provides the information needed by the renderer process to contact a
398 // navigation correction service. Handled by the NetErrorHelper.
399 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo
,
400 GURL
/* Navigation correction service base URL */,
401 std::string
/* language */,
402 std::string
/* origin_country */,
403 std::string
/* API key to use */,
404 GURL
/* Google Search URL to use */)
406 //-----------------------------------------------------------------------------
408 // These are messages sent from the renderer to the browser process.
410 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats
,
411 blink::WebCache::UsageStats
/* stats */)
413 // Tells the browser that content in the current page was blocked due to the
414 // user's content settings.
415 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_ContentBlocked
,
416 ContentSettingsType
/* type of blocked content */)
418 // Sent by the renderer process to check whether access to web databases is
419 // granted by content settings.
420 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase
,
421 int /* render_frame_id */,
422 GURL
/* origin_url */,
423 GURL
/* top origin url */,
424 base::string16
/* database name */,
425 base::string16
/* database display name */,
428 // Sent by the renderer process to check whether access to DOM Storage is
429 // granted by content settings.
430 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage
,
431 int /* render_frame_id */,
432 GURL
/* origin_url */,
433 GURL
/* top origin url */,
434 bool /* if true local storage, otherwise session */,
437 // Sent by the renderer process to check whether access to FileSystem is
438 // granted by content settings.
439 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_RequestFileSystemAccessSync
,
440 int /* render_frame_id */,
441 GURL
/* origin_url */,
442 GURL
/* top origin url */,
445 // Sent by the renderer process to check whether access to FileSystem is
446 // granted by content settings.
447 IPC_MESSAGE_CONTROL4(ChromeViewHostMsg_RequestFileSystemAccessAsync
,
448 int /* render_frame_id */,
449 int /* request_id */,
450 GURL
/* origin_url */,
451 GURL
/* top origin url */)
453 // Sent by the renderer process to check whether access to Indexed DBis
454 // granted by content settings.
455 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB
,
456 int /* render_frame_id */,
457 GURL
/* origin_url */,
458 GURL
/* top origin url */,
459 base::string16
/* database name */,
462 // Return information about a plugin for the given URL and MIME type.
463 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
464 // about specific reasons why a plug-in can't be used, for example because it's
466 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo
,
467 int /* render_frame_id */,
469 GURL
/* top origin url */,
470 std::string
/* mime_type */,
471 ChromeViewHostMsg_GetPluginInfo_Output
/* output */)
473 // Returns whether any internal plugin supporting |mime_type| is registered
474 // Does not determine whether the plugin can actually be instantiated
475 // (e.g. whether it is allowed or has all its dependencies).
476 // When the returned *|is_registered| is true, |additional_param_names| and
477 // |additional_param_values| contain the name-value pairs, if any, specified
478 // for the *first* plugin found that is registered for |mime_type|.
479 IPC_SYNC_MESSAGE_CONTROL1_3(
480 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType
,
481 std::string
/* mime_type */,
482 bool /* registered */,
483 std::vector
<base::string16
> /* additional_param_names */,
484 std::vector
<base::string16
> /* additional_param_values */)
486 // Informs the browser of updated frame names.
487 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_UpdateFrameName
,
488 bool /* is_top_level */,
489 std::string
/* name */)
491 #if defined(ENABLE_PLUGIN_INSTALLATION)
492 // Tells the browser to search for a plug-in that can handle the given MIME
493 // type. The result will be sent asynchronously to the routing ID
495 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin
,
496 int /* placeholder_id */,
497 std::string
/* mime_type */)
499 // Notifies the browser that a missing plug-in placeholder has been removed, so
500 // the corresponding PluginPlaceholderHost can be deleted.
501 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost
,
502 int /* placeholder_id */)
504 // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
506 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin
,
507 base::string16
/* plugin_name */)
509 // Notifies a missing plug-in placeholder that no plug-in has been found.
510 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin
)
512 // Notifies a missing plug-in placeholder that we have started downloading
514 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin
)
516 // Notifies a missing plug-in placeholder that we have finished downloading
518 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin
)
520 // Notifies a missing plug-in placeholder that there was an error downloading
522 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin
,
523 std::string
/* message */)
524 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
526 // Notifies a missing plug-in placeholder that the user cancelled downloading
528 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin
)
530 // Tells the browser to open chrome://plugins in a new tab. We use a separate
531 // message because renderer processes aren't allowed to directly navigate to
533 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins
)
535 // Tells the browser that there was an error loading a plug-in.
536 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin
,
537 base::FilePath
/* plugin_path */)
539 // Tells the browser that we blocked a plug-in because NPAPI is not supported.
540 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported
,
541 std::string
/* identifer */)
543 // Tells the renderer that the NPAPI cannot be used. For example Ash on windows.
544 IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported
)
546 // Notification that the page has an OpenSearch description document
547 // associated with it.
548 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD
,
551 search_provider::OSDDType
)
553 // Find out if the given url's security origin is installed as a search
555 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState
,
557 GURL
/* inquiry url */,
558 search_provider::InstallState
/* install */)
560 // Sends back stats about the V8 heap.
561 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats
,
562 int /* size of heap (allocated from the OS) */,
563 int /* bytes in use */)
565 // Request for a DNS prefetch of the names in the array.
566 // NameList is typedef'ed std::vector<std::string>
567 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch
,
568 std::vector
<std::string
> /* hostnames */)
570 // Request for preconnect to host providing resource specified by URL
571 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_Preconnect
,
572 GURL
/* preconnect target url */)
574 // Notifies when a plugin couldn't be loaded because it's outdated.
575 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin
,
576 int /* placeholder ID */,
577 std::string
/* plug-in group identifier */)
579 // Notifies when a plugin couldn't be loaded because it requires
580 // user authorization.
581 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin
,
582 base::string16
/* name */,
583 std::string
/* plug-in group identifier */)
585 // Provide the browser process with information about the WebCore resource
586 // cache and current renderer framerate.
587 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats
,
588 blink::WebCache::ResourceTypeStats
)
590 // Message sent from the renderer to the browser to notify it of a
591 // window.print() call which should cancel the prerender. The message is sent
592 // only when the renderer is prerendering.
593 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting
)
595 #if defined(ENABLE_EXTENSIONS)
596 // Sent by the renderer to check if a URL has permission to trigger a clipboard
597 // read/write operation from the DOM.
598 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardRead
,
601 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardWrite
,
606 // Sent when the renderer was prevented from displaying insecure content in
607 // a secure page by a security policy. The page may appear incomplete.
608 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent
)
610 // Sent when the renderer was prevented from running insecure content in
611 // a secure origin by a security policy. The page may appear incomplete.
612 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent
)
614 #if defined(OS_ANDROID)
615 // Contains info about whether the current page can be treated as a webapp.
616 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveWebappInformation
,
618 bool /* is_mobile_webapp_capable */,
619 bool /* is_apple_mobile_webapp_capable */,
620 GURL
/* expected_url */)
622 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DidRetrieveMetaTagContent
,
624 std::string
/* tag_name */,
625 std::string
/* tag_content */,
626 GURL
/* expected_url */)
627 #endif // defined(OS_ANDROID)
629 // The currently displayed PDF has an unsupported feature.
630 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature
)
632 // Brings up SaveAs... dialog to save specified URL.
633 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PDFSaveURLAs
,
635 content::Referrer
/* referrer */)
637 // Updates the content restrictions, i.e. to disable print/copy.
638 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PDFUpdateContentRestrictions
,
639 int /* restrictions */)
641 // Brings up a Password... dialog for protected documents.
642 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_PDFModalPromptForPassword
,
643 std::string
/* prompt */,
644 std::string
/* actual_value */)
646 // This message indicates the error appeared in the frame.
647 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError
,
650 // This message indicates the monitored frame loading had completed.
651 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted
)
653 // Provide the browser process with current renderer framerate.
654 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS
,
655 int /* routing id */,
656 float /* frames per second */)
658 // Logs events from InstantExtended New Tab Pages.
659 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_LogEvent
,
661 NTPLoggingEventType
/* event */)
663 // Logs an impression on one of the Most Visited tile on the InstantExtended
665 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression
,
668 base::string16
/* provider */)
670 // Logs a navigation on one of the Most Visited tile on the InstantExtended
672 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation
,
675 base::string16
/* provider */)
677 // The Instant page asks for Chrome identity check against |identity|.
678 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck
,
680 base::string16
/* identity */)
682 // Tells InstantExtended to set the omnibox focus state.
683 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox
,
685 OmniboxFocusState
/* state */)
687 // Tells InstantExtended to paste text into the omnibox. If text is empty,
688 // the clipboard contents will be pasted. This causes the omnibox dropdown to
690 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown
,
692 base::string16
/* text to be pasted */)
694 // Tells InstantExtended whether the embedded search API is supported.
695 // See http://dev.chromium.org/embeddedsearch
696 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined
,
700 // Tells InstantExtended to delete a most visited item.
701 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem
,
705 // Tells InstantExtended to navigate the active tab to a possibly privileged
707 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate
,
709 GURL
/* destination */,
710 WindowOpenDisposition
/* disposition */,
711 bool /*is_most_visited_item_url*/)
713 // Tells InstantExtended to undo all most visited item deletions.
714 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions
,
717 // Tells InstantExtended to undo one most visited item deletion.
718 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion
,
722 // Tells InstantExtended whether the page supports voice search.
723 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported
,
725 bool /* supported */)
727 // Tells the renderer a list of URLs which should be bounced back to the browser
728 // process so that they can be assigned to an Instant renderer.
729 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs
,
730 std::vector
<GURL
> /* search_urls */,
731 GURL
/* new_tab_page_url */)
733 // Tells listeners that a detailed message was reported to the console by
735 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DetailedConsoleMessageAdded
,
736 base::string16
/* message */,
737 base::string16
/* source */,
738 extensions::StackTrace
/* stack trace */,
739 int32
/* severity level */)
741 #if defined(ENABLE_PLUGINS)
742 // Sent by the renderer to check if crash reporting is enabled.
743 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled
,