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 <map> 7 #include <set> 8 #include <string> 9 #include <vector> 10 11 #include "base/basictypes.h" 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/omnibox_focus_state.h" 25 #include "chrome/common/search_provider.h" 26 #include "chrome/common/translate/language_detection_details.h" 27 #include "chrome/common/translate/translate_errors.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/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 class SkBitmap; 46 47 // Command values for the cmd parameter of the 48 // ViewHost_JavaScriptStressTestControl message. For each command the parameter 49 // passed has a different meaning: 50 // For the command kJavaScriptStressTestSetStressRunType the parameter it the 51 // type taken from the enumeration v8::Testing::StressType. 52 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the 53 // number of the stress run about to take place. 54 enum ViewHostMsg_JavaScriptStressTestControl_Commands { 55 kJavaScriptStressTestSetStressRunType = 0, 56 kJavaScriptStressTestPrepareStressRun = 1, 57 }; 58 59 // This enum is inside a struct so that we can forward-declare the struct in 60 // others headers without having to include this one. 61 struct ChromeViewHostMsg_GetPluginInfo_Status { 62 enum Value { 63 kAllowed, 64 kBlocked, 65 kClickToPlay, 66 kDisabled, 67 kNotFound, 68 kNPAPINotSupported, 69 kOutdatedBlocked, 70 kOutdatedDisallowed, 71 kUnauthorized, 72 }; 73 74 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {} 75 76 Value value; 77 }; 78 79 namespace IPC { 80 81 #if defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID) 82 83 // TODO(port): this shouldn't exist. However, the plugin stuff is really using 84 // HWNDS (NativeView), and making Windows calls based on them. I've not figured 85 // out the deal with plugins yet. 86 // TODO(android): a gfx::NativeView is the same as a gfx::NativeWindow. 87 template <> 88 struct ParamTraits<gfx::NativeView> { 89 typedef gfx::NativeView param_type; 90 static void Write(Message* m, const param_type& p) { 91 NOTIMPLEMENTED(); 92 } 93 94 static bool Read(const Message* m, PickleIterator* iter, param_type* p) { 95 NOTIMPLEMENTED(); 96 *p = NULL; 97 return true; 98 } 99 100 static void Log(const param_type& p, std::string* l) { 101 l->append(base::StringPrintf("<gfx::NativeView>")); 102 } 103 }; 104 105 #endif // defined(OS_POSIX) && !defined(USE_AURA) && !defined(OS_ANDROID) 106 107 template <> 108 struct ParamTraits<ContentSettingsPattern> { 109 typedef ContentSettingsPattern param_type; 110 static void Write(Message* m, const param_type& p); 111 static bool Read(const Message* m, PickleIterator* iter, param_type* r); 112 static void Log(const param_type& p, std::string* l); 113 }; 114 115 } // namespace IPC 116 117 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 118 119 #define IPC_MESSAGE_START ChromeMsgStart 120 121 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value) 122 IPC_ENUM_TRAITS(OmniboxFocusChangeReason) 123 IPC_ENUM_TRAITS(OmniboxFocusState) 124 IPC_ENUM_TRAITS(search_provider::OSDDType) 125 IPC_ENUM_TRAITS(search_provider::InstallState) 126 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment) 127 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling) 128 IPC_ENUM_TRAITS(TranslateErrors::Type) 129 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) 130 IPC_ENUM_TRAITS(content::TopControlsState) 131 132 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) 133 IPC_STRUCT_TRAITS_MEMBER(value) 134 IPC_STRUCT_TRAITS_END() 135 136 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. 137 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) 138 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) 139 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) 140 IPC_STRUCT_MEMBER(std::string, actual_mime_type) 141 IPC_STRUCT_MEMBER(std::string, group_identifier) 142 IPC_STRUCT_MEMBER(string16, group_name) 143 IPC_STRUCT_END() 144 145 IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) 146 IPC_STRUCT_TRAITS_MEMBER(scheme) 147 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard) 148 IPC_STRUCT_TRAITS_MEMBER(host) 149 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard) 150 IPC_STRUCT_TRAITS_MEMBER(port) 151 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard) 152 IPC_STRUCT_TRAITS_MEMBER(path) 153 IPC_STRUCT_TRAITS_MEMBER(is_path_wildcard) 154 IPC_STRUCT_TRAITS_END() 155 156 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) 157 IPC_STRUCT_TRAITS_MEMBER(primary_pattern) 158 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) 159 IPC_STRUCT_TRAITS_MEMBER(setting) 160 IPC_STRUCT_TRAITS_MEMBER(source) 161 IPC_STRUCT_TRAITS_MEMBER(incognito) 162 IPC_STRUCT_TRAITS_END() 163 164 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem) 165 IPC_STRUCT_TRAITS_MEMBER(url) 166 IPC_STRUCT_TRAITS_MEMBER(title) 167 IPC_STRUCT_TRAITS_END() 168 169 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) 170 IPC_STRUCT_TRAITS_MEMBER(image_rules) 171 IPC_STRUCT_TRAITS_MEMBER(script_rules) 172 IPC_STRUCT_TRAITS_END() 173 174 IPC_STRUCT_TRAITS_BEGIN(RGBAColor) 175 IPC_STRUCT_TRAITS_MEMBER(r) 176 IPC_STRUCT_TRAITS_MEMBER(g) 177 IPC_STRUCT_TRAITS_MEMBER(b) 178 IPC_STRUCT_TRAITS_MEMBER(a) 179 IPC_STRUCT_TRAITS_END() 180 181 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo) 182 IPC_STRUCT_TRAITS_MEMBER(using_default_theme) 183 IPC_STRUCT_TRAITS_MEMBER(background_color) 184 IPC_STRUCT_TRAITS_MEMBER(text_color) 185 IPC_STRUCT_TRAITS_MEMBER(link_color) 186 IPC_STRUCT_TRAITS_MEMBER(text_color_light) 187 IPC_STRUCT_TRAITS_MEMBER(header_color) 188 IPC_STRUCT_TRAITS_MEMBER(section_border_color) 189 IPC_STRUCT_TRAITS_MEMBER(theme_id) 190 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment) 191 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment) 192 IPC_STRUCT_TRAITS_MEMBER(image_tiling) 193 IPC_STRUCT_TRAITS_MEMBER(image_height) 194 IPC_STRUCT_TRAITS_MEMBER(has_attribution) 195 IPC_STRUCT_TRAITS_MEMBER(logo_alternate) 196 IPC_STRUCT_TRAITS_END() 197 198 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) 199 IPC_STRUCT_TRAITS_MEMBER(count) 200 IPC_STRUCT_TRAITS_MEMBER(size) 201 IPC_STRUCT_TRAITS_MEMBER(liveSize) 202 IPC_STRUCT_TRAITS_MEMBER(decodedSize) 203 IPC_STRUCT_TRAITS_END() 204 205 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) 206 IPC_STRUCT_TRAITS_MEMBER(images) 207 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) 208 IPC_STRUCT_TRAITS_MEMBER(scripts) 209 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets) 210 IPC_STRUCT_TRAITS_MEMBER(fonts) 211 IPC_STRUCT_TRAITS_END() 212 213 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats) 214 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity) 215 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity) 216 IPC_STRUCT_TRAITS_MEMBER(capacity) 217 IPC_STRUCT_TRAITS_MEMBER(liveSize) 218 IPC_STRUCT_TRAITS_MEMBER(deadSize) 219 IPC_STRUCT_TRAITS_END() 220 221 IPC_STRUCT_TRAITS_BEGIN(LanguageDetectionDetails) 222 IPC_STRUCT_TRAITS_MEMBER(time) 223 IPC_STRUCT_TRAITS_MEMBER(url) 224 IPC_STRUCT_TRAITS_MEMBER(content_language) 225 IPC_STRUCT_TRAITS_MEMBER(cld_language) 226 IPC_STRUCT_TRAITS_MEMBER(is_cld_reliable) 227 IPC_STRUCT_TRAITS_MEMBER(html_root_language) 228 IPC_STRUCT_TRAITS_MEMBER(adopted_language) 229 IPC_STRUCT_TRAITS_MEMBER(contents) 230 IPC_STRUCT_TRAITS_END() 231 232 //----------------------------------------------------------------------------- 233 // RenderView messages 234 // These are messages sent from the browser to the renderer process. 235 236 // Tells the renderer to set its maximum cache size to the supplied value. 237 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities, 238 size_t /* min_dead_capacity */, 239 size_t /* max_dead_capacity */, 240 size_t /* capacity */) 241 242 // Tells the renderer to clear the cache. 243 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache, 244 bool /* on_navigation */) 245 246 // Tells the renderer to dump as much memory as it can, perhaps because we 247 // have memory pressure or the renderer is (or will be) paged out. This 248 // should only result in purging objects we can recalculate, e.g. caches or 249 // JS garbage, not in purging irreplaceable objects. 250 IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory) 251 252 // For WebUI testing, this message stores parameters to do ScriptEvalRequest at 253 // a time which is late enough to not be thrown out, and early enough to be 254 // before onload events are fired. 255 IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript, 256 string16, /* frame_xpath */ 257 string16, /* jscript_url */ 258 int, /* ID */ 259 bool /* If true, result is sent back. */) 260 261 // Set the content setting rules stored by the renderer. 262 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules, 263 RendererContentSettingRules /* rules */) 264 265 // Tells the render view to load all blocked plugins with the given identifier. 266 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins, 267 std::string /* identifier */) 268 269 // Asks the renderer to send back stats on the WebCore cache broken down by 270 // resource types. 271 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats) 272 273 // Tells the renderer to create a FieldTrial, and by using a 100% probability 274 // for the FieldTrial, forces the FieldTrial to have assigned group name. 275 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup, 276 std::string /* field trial name */, 277 std::string /* group name that was assigned. */) 278 279 // Asks the renderer to send back V8 heap stats. 280 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats) 281 282 // Posts a message to the renderer. 283 IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost, 284 std::string /* The message */, 285 std::string /* The origin */, 286 std::string /* The target*/) 287 288 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant) 289 290 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged, 291 OmniboxFocusState /* new_focus_state */, 292 OmniboxFocusChangeReason /* reason */) 293 294 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFontInformation, 295 string16 /* omnibox_font */, 296 size_t /* omnibox_font_size */) 297 298 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange, 299 int /* start */, 300 int /* width */) 301 302 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged, 303 std::vector<InstantMostVisitedItem> /* items */) 304 305 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPromoInformation, 306 bool /* is_app_launcher_enabled */) 307 308 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress, 309 bool /* input_in_progress */) 310 311 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit, 312 string16 /* value */) 313 314 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged, 315 ThemeBackgroundInfo /* value */) 316 317 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch) 318 319 // Toggles visual muting of the render view area. This is on when a constrained 320 // window is showing. 321 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized, 322 bool /* deemphazied */) 323 324 // Tells the renderer to translate the page contents from one language to 325 // another. 326 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage, 327 int /* page id */, 328 std::string, /* the script injected in the page */ 329 std::string, /* BCP 47/RFC 5646 language code the page 330 is in */ 331 std::string /* BCP 47/RFC 5646 language code to translate 332 to */) 333 334 // Tells the renderer to revert the text of translated page to its original 335 // contents. 336 IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation, 337 int /* page id */) 338 339 // Sent on process startup to indicate whether this process is running in 340 // incognito mode. 341 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess, 342 bool /* is_incognito_processs */) 343 344 // Sent on process startup to indicate whether the extension activity 345 // log is enabled. 346 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetExtensionActivityLogEnabled, 347 bool /* extension_activity_log_enabled */) 348 349 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent. 350 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent, 351 bool /* allowed */) 352 353 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent. 354 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent, 355 bool /* allowed */) 356 357 // Tells renderer to always enforce mixed content blocking for this host. 358 IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost, 359 std::string /* host */) 360 361 // Sent when the profile changes the kSafeBrowsingEnabled preference. 362 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection, 363 bool /* enable_phishing_detection */) 364 365 // This message asks frame sniffer start. 366 IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer, 367 string16 /* frame-name */) 368 369 // Asks the renderer for a thumbnail of the image selected by the most 370 // recently opened context menu, if there is one. If the image's area 371 // is greater than thumbnail_min_area it will be downscaled to 372 // be within thumbnail_max_size. The possibly downsampled image will be 373 // returned in a ChromeViewHostMsg_RequestThumbnailForContextNode_ACK message. 374 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestThumbnailForContextNode, 375 int /* thumbnail_min_area_pixels */, 376 gfx::Size /* thumbnail_max_size_pixels */) 377 378 // Notifies the renderer whether hiding/showing the top controls is enabled, 379 // what the current state should be, and whether or not to animate to the 380 // proper state. 381 IPC_MESSAGE_ROUTED3(ChromeViewMsg_UpdateTopControlsState, 382 content::TopControlsState /* constraints */, 383 content::TopControlsState /* current */, 384 bool /* animate */) 385 386 387 // Updates the window features of the render view. 388 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetWindowFeatures, 389 WebKit::WebWindowFeatures /* window_features */) 390 391 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK, 392 SkBitmap /* thumbnail */) 393 394 395 // JavaScript related messages ----------------------------------------------- 396 397 // Notify the JavaScript engine in the render to change its parameters 398 // while performing stress testing. 399 IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl, 400 int /* cmd */, 401 int /* param */) 402 403 // Asks the renderer to send back FPS. 404 IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS) 405 406 // Tells the view it is displaying an interstitial page. 407 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial) 408 409 // Provides the renderer with the results of the browser's investigation into 410 // why a recent main frame load failed (currently, just DNS probe result). 411 // NetErrorHelper will receive this mesage and replace or update the error 412 // page with more specific troubleshooting suggestions. 413 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo, 414 int /* DNS probe status */) 415 416 //----------------------------------------------------------------------------- 417 // Misc messages 418 // These are messages sent from the renderer to the browser process. 419 420 // Provides the contents for the given page that was loaded recently. 421 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PageContents, 422 GURL /* URL of the page */, 423 string16 /* page contents */) 424 425 // Notification that the language for the tab has been determined. 426 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined, 427 LanguageDetectionDetails /* details about lang detection */, 428 bool /* whether the page needs translation */) 429 430 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats, 431 WebKit::WebCache::UsageStats /* stats */) 432 433 // Tells the browser that content in the current page was blocked due to the 434 // user's content settings. 435 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked, 436 ContentSettingsType, /* type of blocked content */ 437 std::string /* resource identifier */) 438 439 // Sent by the renderer process to check whether access to web databases is 440 // granted by content settings. 441 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase, 442 int /* render_view_id */, 443 GURL /* origin_url */, 444 GURL /* top origin url */, 445 string16 /* database name */, 446 string16 /* database display name */, 447 bool /* allowed */) 448 449 // Sent by the renderer process to check whether access to DOM Storage is 450 // granted by content settings. 451 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage, 452 int /* render_view_id */, 453 GURL /* origin_url */, 454 GURL /* top origin url */, 455 bool /* if true local storage, otherwise session */, 456 bool /* allowed */) 457 458 // Sent by the renderer process to check whether access to FileSystem is 459 // granted by content settings. 460 IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem, 461 int /* render_view_id */, 462 GURL /* origin_url */, 463 GURL /* top origin url */, 464 bool /* allowed */) 465 466 // Sent by the renderer process to check whether access to Indexed DBis 467 // granted by content settings. 468 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB, 469 int /* render_view_id */, 470 GURL /* origin_url */, 471 GURL /* top origin url */, 472 string16 /* database name */, 473 bool /* allowed */) 474 475 // Return information about a plugin for the given URL and MIME type. 476 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows 477 // about specific reasons why a plug-in can't be used, for example because it's 478 // disabled. 479 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_GetPluginInfo, 480 int /* render_view_id */, 481 GURL /* url */, 482 GURL /* top origin url */, 483 std::string /* mime_type */, 484 ChromeViewHostMsg_GetPluginInfo_Output /* output */) 485 486 #if defined(ENABLE_PLUGIN_INSTALLATION) 487 // Tells the browser to search for a plug-in that can handle the given MIME 488 // type. The result will be sent asynchronously to the routing ID 489 // |placeholder_id|. 490 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin, 491 int /* placeholder_id */, 492 std::string /* mime_type */) 493 494 // Notifies the browser that a missing plug-in placeholder has been removed, so 495 // the corresponding PluginPlaceholderHost can be deleted. 496 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost, 497 int /* placeholder_id */) 498 499 // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name| 500 // has been found. 501 IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin, 502 string16 /* plugin_name */) 503 504 // Notifies a missing plug-in placeholder that no plug-in has been found. 505 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin) 506 507 // Notifies a missing plug-in placeholder that we have started downloading 508 // the plug-in. 509 IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin) 510 511 // Notifies a missing plug-in placeholder that we have finished downloading 512 // the plug-in. 513 IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin) 514 515 // Notifies a missing plug-in placeholder that there was an error downloading 516 // the plug-in. 517 IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin, 518 std::string /* message */) 519 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 520 521 // Notifies a missing plug-in placeholder that the user cancelled downloading 522 // the plug-in. 523 IPC_MESSAGE_ROUTED0(ChromeViewMsg_CancelledDownloadingPlugin) 524 525 // Tells the browser to open chrome://plugins in a new tab. We use a separate 526 // message because renderer processes aren't allowed to directly navigate to 527 // chrome:// URLs. 528 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_OpenAboutPlugins) 529 530 // Tells the browser that there was an error loading a plug-in. 531 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CouldNotLoadPlugin, 532 base::FilePath /* plugin_path */) 533 534 // Tells the browser that we blocked a plug-in because NPAPI is not supported. 535 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_NPAPINotSupported, 536 std::string /* identifer */) 537 538 // Tells the renderer that the NPAPI cannot be used. For example Ash on windows. 539 IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported) 540 541 // A message for an external host. 542 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost, 543 std::string /* message */, 544 std::string /* origin */, 545 std::string /* target */) 546 547 // Notification that the page has an OpenSearch description document 548 // associated with it. 549 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD, 550 int32 /* page_id */, 551 GURL /* url of OS description document */, 552 search_provider::OSDDType) 553 554 // Find out if the given url's security origin is installed as a search 555 // provider. 556 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState, 557 GURL /* page url */, 558 GURL /* inquiry url */, 559 search_provider::InstallState /* install */) 560 561 // Sends back stats about the V8 heap. 562 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats, 563 int /* size of heap (allocated from the OS) */, 564 int /* bytes in use */) 565 566 // Request for a DNS prefetch of the names in the array. 567 // NameList is typedef'ed std::vector<std::string> 568 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch, 569 std::vector<std::string> /* hostnames */) 570 571 // Request for preconnect to host providing resource specified by URL 572 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_Preconnect, 573 GURL /* preconnect target url */) 574 575 // Notifies when a plugin couldn't be loaded because it's outdated. 576 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin, 577 int /* placeholder ID */, 578 std::string /* plug-in group identifier */) 579 580 // Notifies when a plugin couldn't be loaded because it requires 581 // user authorization. 582 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin, 583 string16 /* name */, 584 std::string /* plug-in group identifier */) 585 586 // Provide the browser process with information about the WebCore resource 587 // cache and current renderer framerate. 588 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats, 589 WebKit::WebCache::ResourceTypeStats) 590 591 // Notifies the browser that a page has been translated. 592 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated, 593 int, /* page id */ 594 std::string /* the original language */, 595 std::string /* the translated language */, 596 TranslateErrors::Type /* the error type if available */) 597 598 // Message sent from the renderer to the browser to notify it of events which 599 // may lead to the cancellation of a prerender. The message is sent only when 600 // the renderer is prerendering. 601 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media) 602 603 // Message sent from the renderer to the browser to notify it of a 604 // window.print() call which should cancel the prerender. The message is sent 605 // only when the renderer is prerendering. 606 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) 607 608 // Sent by the renderer to check if a URL has permission to trigger a clipboard 609 // read/write operation from the DOM. 610 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead, 611 GURL /* origin */, 612 bool /* allowed */) 613 IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite, 614 GURL /* origin */, 615 bool /* allowed */) 616 617 // Sent when the renderer was prevented from displaying insecure content in 618 // a secure page by a security policy. The page may appear incomplete. 619 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent) 620 621 // Sent when the renderer was prevented from running insecure content in 622 // a secure origin by a security policy. The page may appear incomplete. 623 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) 624 625 // Message sent from renderer to the browser when the element that is focused 626 // has been touched. A bool is passed in this message which indicates if the 627 // node is editable. 628 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched, 629 bool /* editable */) 630 631 // The currently displayed PDF has an unsupported feature. 632 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature) 633 634 // Brings up SaveAs... dialog to save specified URL. 635 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PDFSaveURLAs, 636 GURL /* url */, 637 content::Referrer /* referrer */) 638 639 // Updates the content restrictions, i.e. to disable print/copy. 640 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PDFUpdateContentRestrictions, 641 int /* restrictions */) 642 643 // This message indicates the error appeared in the frame. 644 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError, 645 int /* error */) 646 647 // This message indicates the monitored frame loading had completed. 648 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted) 649 650 // The following messages are used to set and get cookies for ChromeFrame 651 // processes. 652 // Used to set a cookie. The cookie is set asynchronously, but will be 653 // available to a subsequent ChromeViewHostMsg_GetCookies request. 654 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie, 655 GURL /* url */, 656 GURL /* first_party_for_cookies */, 657 std::string /* cookie */) 658 659 // Used to get cookies for the given URL. This may block waiting for a 660 // previous SetCookie message to be processed. 661 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, 662 GURL /* url */, 663 GURL /* first_party_for_cookies */, 664 std::string /* cookies */) 665 666 // Provide the browser process with current renderer framerate. 667 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, 668 int /* routing id */, 669 float /* frames per second */) 670 671 // Counts a mouseover event on an InstantExtended most visited tile. 672 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_CountMouseover, 673 int /* page_id */) 674 675 // Tells InstantExtended to set the omnibox focus state. 676 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox, 677 int /* page_id */, 678 OmniboxFocusState /* state */) 679 680 // Tells InstantExtended to paste text into the omnibox. If text is empty, 681 // the clipboard contents will be pasted. This causes the omnibox dropdown to 682 // open. 683 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown, 684 int /* page_id */, 685 string16 /* text to be pasted */) 686 687 // Tells InstantExtended whether the embedded search API is supported. 688 // See http://dev.chromium.org/embeddedsearch 689 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined, 690 int /* page_id */, 691 bool /* result */) 692 693 // Tells InstantExtended to delete a most visited item. 694 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem, 695 int /* page_id */, 696 GURL /* url */) 697 698 // Tells InstantExtended to navigate the active tab to a possibly priveleged 699 // URL. 700 IPC_MESSAGE_ROUTED5(ChromeViewHostMsg_SearchBoxNavigate, 701 int /* page_id */, 702 GURL /* destination */, 703 content::PageTransition /* transition */, 704 WindowOpenDisposition /* disposition */, 705 bool /* is_search_type */) 706 707 // Tells InstantExtended to undo all most visited item deletions. 708 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions, 709 int /* page_id */) 710 711 // Tells InstantExtended to undo one most visited item deletion. 712 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion, 713 int /* page_id */, 714 GURL /* url */) 715 716 // Tells InstantExtended whether the page supports voice search. 717 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported, 718 int /* page_id */, 719 bool /* supported */) 720