| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Multiply-included file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
| 6 #include <map> | 6 #include <map> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 // TODO(erg): This list has been temporarily annotated by erg while doing work | 11 // TODO(erg): This list has been temporarily annotated by erg while doing work |
| 12 // on which headers to pull out. | 12 // on which headers to pull out. |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/process.h" | 15 #include "base/process.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "base/string16.h" | 17 #include "base/string16.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 20 #include "chrome/common/content_settings.h" | 20 #include "chrome/common/content_settings.h" |
| 21 #include "chrome/common/extensions/extension.h" | |
| 22 #include "chrome/common/extensions/extension_extent.h" | |
| 23 #include "chrome/common/extensions/url_pattern.h" | |
| 24 #include "chrome/common/instant_types.h" | 21 #include "chrome/common/instant_types.h" |
| 25 #include "chrome/common/nacl_types.h" | 22 #include "chrome/common/nacl_types.h" |
| 26 #include "chrome/common/render_messages_params.h" | 23 #include "chrome/common/render_messages_params.h" |
| 27 #include "chrome/common/thumbnail_score.h" | 24 #include "chrome/common/thumbnail_score.h" |
| 28 #include "chrome/common/translate_errors.h" | 25 #include "chrome/common/translate_errors.h" |
| 29 #include "chrome/common/view_types.h" | 26 #include "chrome/common/view_types.h" |
| 30 #include "chrome/common/web_apps.h" | |
| 31 #include "content/common/common_param_traits.h" | 27 #include "content/common/common_param_traits.h" |
| 32 #include "chrome/common/web_apps.h" | |
| 33 #include "ipc/ipc_message_macros.h" | 28 #include "ipc/ipc_message_macros.h" |
| 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
| 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 36 #include "third_party/skia/include/core/SkBitmap.h" | 31 #include "third_party/skia/include/core/SkBitmap.h" |
| 37 #include "ui/gfx/rect.h" | 32 #include "ui/gfx/rect.h" |
| 38 | 33 |
| 39 // TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes | 34 // Singly-included section for enums and custom IPC traits. |
| 40 // more sense with our current design. | |
| 41 | |
| 42 // Singly-included section, not yet converted. | |
| 43 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 35 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 44 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 36 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 45 | 37 |
| 46 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need | |
| 47 // to typedef it to avoid that. | |
| 48 // Substitution map for l10n messages. | |
| 49 typedef std::map<std::string, std::string> SubstitutionMap; | |
| 50 | |
| 51 // Values that may be OR'd together to form the 'flags' parameter of the | 38 // Values that may be OR'd together to form the 'flags' parameter of the |
| 52 // ViewMsg_EnablePreferredSizeChangedMode message. | 39 // ViewMsg_EnablePreferredSizeChangedMode message. |
| 53 enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { | 40 enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { |
| 54 kPreferredSizeNothing, | 41 kPreferredSizeNothing, |
| 55 kPreferredSizeWidth = 1 << 0, | 42 kPreferredSizeWidth = 1 << 0, |
| 56 // Requesting the height currently requires a polling loop in render_view.cc. | 43 // Requesting the height currently requires a polling loop in render_view.cc. |
| 57 kPreferredSizeHeightThisIsSlow = 1 << 1, | 44 kPreferredSizeHeightThisIsSlow = 1 << 1, |
| 58 }; | 45 }; |
| 59 | 46 |
| 60 // Command values for the cmd parameter of the | 47 // Command values for the cmd parameter of the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #endif // defined(OS_POSIX) | 84 #endif // defined(OS_POSIX) |
| 98 | 85 |
| 99 template <> | 86 template <> |
| 100 struct ParamTraits<ContentSettings> { | 87 struct ParamTraits<ContentSettings> { |
| 101 typedef ContentSettings param_type; | 88 typedef ContentSettings param_type; |
| 102 static void Write(Message* m, const param_type& p); | 89 static void Write(Message* m, const param_type& p); |
| 103 static bool Read(const Message* m, void** iter, param_type* r); | 90 static bool Read(const Message* m, void** iter, param_type* r); |
| 104 static void Log(const param_type& p, std::string* l); | 91 static void Log(const param_type& p, std::string* l); |
| 105 }; | 92 }; |
| 106 | 93 |
| 107 template <> | |
| 108 struct ParamTraits<URLPattern> { | |
| 109 typedef URLPattern param_type; | |
| 110 static void Write(Message* m, const param_type& p); | |
| 111 static bool Read(const Message* m, void** iter, param_type* p); | |
| 112 static void Log(const param_type& p, std::string* l); | |
| 113 }; | |
| 114 | |
| 115 template <> | |
| 116 struct ParamTraits<ExtensionExtent> { | |
| 117 typedef ExtensionExtent param_type; | |
| 118 static void Write(Message* m, const param_type& p); | |
| 119 static bool Read(const Message* m, void** iter, param_type* p); | |
| 120 static void Log(const param_type& p, std::string* l); | |
| 121 }; | |
| 122 | |
| 123 } // namespace IPC | 94 } // namespace IPC |
| 124 | 95 |
| 125 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 96 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| 126 | 97 |
| 127 #define IPC_MESSAGE_START ChromeMsgStart | 98 #define IPC_MESSAGE_START ChromeMsgStart |
| 128 | 99 |
| 129 IPC_ENUM_TRAITS(ContentSetting) | 100 IPC_ENUM_TRAITS(ContentSetting) |
| 130 IPC_ENUM_TRAITS(ContentSettingsType) | 101 IPC_ENUM_TRAITS(ContentSettingsType) |
| 131 IPC_ENUM_TRAITS(InstantCompleteBehavior) | 102 IPC_ENUM_TRAITS(InstantCompleteBehavior) |
| 132 IPC_ENUM_TRAITS(TranslateErrors::Type) | 103 IPC_ENUM_TRAITS(TranslateErrors::Type) |
| 133 IPC_ENUM_TRAITS(ViewType::Type) | 104 IPC_ENUM_TRAITS(ViewType::Type) |
| 134 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) | 105 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) |
| 135 | 106 |
| 136 IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore) | 107 IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore) |
| 137 IPC_STRUCT_TRAITS_MEMBER(boring_score) | 108 IPC_STRUCT_TRAITS_MEMBER(boring_score) |
| 138 IPC_STRUCT_TRAITS_MEMBER(good_clipping) | 109 IPC_STRUCT_TRAITS_MEMBER(good_clipping) |
| 139 IPC_STRUCT_TRAITS_MEMBER(at_top) | 110 IPC_STRUCT_TRAITS_MEMBER(at_top) |
| 140 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot) | 111 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot) |
| 141 IPC_STRUCT_TRAITS_END() | 112 IPC_STRUCT_TRAITS_END() |
| 142 | 113 |
| 143 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) | |
| 144 IPC_STRUCT_TRAITS_MEMBER(url) | |
| 145 IPC_STRUCT_TRAITS_MEMBER(width) | |
| 146 IPC_STRUCT_TRAITS_MEMBER(height) | |
| 147 IPC_STRUCT_TRAITS_MEMBER(data) | |
| 148 IPC_STRUCT_TRAITS_END() | |
| 149 | |
| 150 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) | |
| 151 IPC_STRUCT_TRAITS_MEMBER(title) | |
| 152 IPC_STRUCT_TRAITS_MEMBER(description) | |
| 153 IPC_STRUCT_TRAITS_MEMBER(app_url) | |
| 154 IPC_STRUCT_TRAITS_MEMBER(icons) | |
| 155 IPC_STRUCT_TRAITS_MEMBER(permissions) | |
| 156 IPC_STRUCT_TRAITS_MEMBER(launch_container) | |
| 157 IPC_STRUCT_TRAITS_END() | |
| 158 | |
| 159 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) | 114 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) |
| 160 IPC_STRUCT_TRAITS_MEMBER(count) | 115 IPC_STRUCT_TRAITS_MEMBER(count) |
| 161 IPC_STRUCT_TRAITS_MEMBER(size) | 116 IPC_STRUCT_TRAITS_MEMBER(size) |
| 162 IPC_STRUCT_TRAITS_MEMBER(liveSize) | 117 IPC_STRUCT_TRAITS_MEMBER(liveSize) |
| 163 IPC_STRUCT_TRAITS_MEMBER(decodedSize) | 118 IPC_STRUCT_TRAITS_MEMBER(decodedSize) |
| 164 IPC_STRUCT_TRAITS_END() | 119 IPC_STRUCT_TRAITS_END() |
| 165 | 120 |
| 166 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) | 121 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) |
| 167 IPC_STRUCT_TRAITS_MEMBER(images) | 122 IPC_STRUCT_TRAITS_MEMBER(images) |
| 168 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) | 123 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage, | 217 IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage, |
| 263 GURL /* url of page which is needed to save */) | 218 GURL /* url of page which is needed to save */) |
| 264 | 219 |
| 265 // Get html data by serializing all frames of current page with lists | 220 // Get html data by serializing all frames of current page with lists |
| 266 // which contain all resource links that have local copy. | 221 // which contain all resource links that have local copy. |
| 267 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, | 222 IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, |
| 268 std::vector<GURL> /* urls that have local copy */, | 223 std::vector<GURL> /* urls that have local copy */, |
| 269 std::vector<FilePath> /* paths of local copy */, | 224 std::vector<FilePath> /* paths of local copy */, |
| 270 FilePath /* local directory path */) | 225 FilePath /* local directory path */) |
| 271 | 226 |
| 272 // Requests application info for the page. The renderer responds back with | |
| 273 // ViewHostMsg_DidGetApplicationInfo. | |
| 274 IPC_MESSAGE_ROUTED1(ViewMsg_GetApplicationInfo, int32 /*page_id*/) | |
| 275 | |
| 276 // Requests the renderer to download the specified favicon image encode it as | 227 // Requests the renderer to download the specified favicon image encode it as |
| 277 // PNG and send the PNG data back ala ViewHostMsg_DidDownloadFavicon. | 228 // PNG and send the PNG data back ala ViewHostMsg_DidDownloadFavicon. |
| 278 IPC_MESSAGE_ROUTED3(ViewMsg_DownloadFavicon, | 229 IPC_MESSAGE_ROUTED3(ViewMsg_DownloadFavicon, |
| 279 int /* identifier for the request */, | 230 int /* identifier for the request */, |
| 280 GURL /* URL of the image */, | 231 GURL /* URL of the image */, |
| 281 int /* Size of the image. Normally 0, but set if you have | 232 int /* Size of the image. Normally 0, but set if you have |
| 282 a preferred image size to request, such as when | 233 a preferred image size to request, such as when |
| 283 downloading the favicon */) | 234 downloading the favicon */) |
| 284 | 235 |
| 285 // Asks the renderer to send back stats on the WebCore cache broken down by | 236 // Asks the renderer to send back stats on the WebCore cache broken down by |
| (...skipping 23 matching lines...) Expand all Loading... |
| 309 // a generated by a user action or because a constrained popup got turned | 260 // a generated by a user action or because a constrained popup got turned |
| 310 // into a full window). | 261 // into a full window). |
| 311 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) | 262 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) |
| 312 | 263 |
| 313 // Sent by the Browser process to alert a window about whether a it should | 264 // Sent by the Browser process to alert a window about whether a it should |
| 314 // allow a scripted window.close(). The renderer assumes every new window is a | 265 // allow a scripted window.close(). The renderer assumes every new window is a |
| 315 // blocked popup until notified otherwise. | 266 // blocked popup until notified otherwise. |
| 316 IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose, | 267 IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose, |
| 317 bool /* script_can_close */) | 268 bool /* script_can_close */) |
| 318 | 269 |
| 319 // The browser sends this message in response to all extension api calls. | |
| 320 IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionResponse, | |
| 321 int /* request_id */, | |
| 322 bool /* success */, | |
| 323 std::string /* response */, | |
| 324 std::string /* error */) | |
| 325 | |
| 326 // This message is optionally routed. If used as a control message, it | |
| 327 // will call a javascript function in every registered context in the | |
| 328 // target process. If routed, it will be restricted to the contexts that | |
| 329 // are part of the target RenderView. | |
| 330 // If |extension_id| is non-empty, the function will be invoked only in | |
| 331 // contexts owned by the extension. |args| is a list of primitive Value types | |
| 332 // that are passed to the function. | |
| 333 IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionMessageInvoke, | |
| 334 std::string /* extension_id */, | |
| 335 std::string /* function_name */, | |
| 336 ListValue /* args */, | |
| 337 GURL /* event URL */) | |
| 338 | |
| 339 // Tell the renderer process all known extension function names. | |
| 340 IPC_MESSAGE_CONTROL1(ViewMsg_Extension_SetFunctionNames, | |
| 341 std::vector<std::string>) | |
| 342 | |
| 343 // TODO(aa): SetAPIPermissions, SetHostPermissions, and possibly | |
| 344 // UpdatePageActions should be replaced with just sending additional data in | |
| 345 // ExtensionLoaded. See: crbug.com/70516. | |
| 346 | |
| 347 // Tell the renderer process which permissions the given extension has. See | |
| 348 // Extension::Permissions for which elements correspond to which permissions. | |
| 349 IPC_MESSAGE_CONTROL2(ViewMsg_Extension_SetAPIPermissions, | |
| 350 std::string /* extension_id */, | |
| 351 std::set<std::string> /* permissions */) | |
| 352 | |
| 353 // Tell the renderer process which host permissions the given extension has. | |
| 354 IPC_MESSAGE_CONTROL2( | |
| 355 ViewMsg_Extension_SetHostPermissions, | |
| 356 GURL /* source extension's origin */, | |
| 357 std::vector<URLPattern> /* URLPatterns the extension can access */) | |
| 358 | |
| 359 // Tell the renderer process all known page action ids for a particular | |
| 360 // extension. | |
| 361 IPC_MESSAGE_CONTROL2(ViewMsg_Extension_UpdatePageActions, | |
| 362 std::string /* extension_id */, | |
| 363 std::vector<std::string> /* page_action_ids */) | |
| 364 | |
| 365 // Notifies the renderer that an extension was loaded in the browser. | |
| 366 IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionLoaded, ViewMsg_ExtensionLoaded_Params) | |
| 367 | |
| 368 // Notifies the renderer that an extension was unloaded in the browser. | |
| 369 IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionUnloaded, std::string) | |
| 370 | |
| 371 // Updates the scripting whitelist for extensions in the render process. This is | |
| 372 // only used for testing. | |
| 373 IPC_MESSAGE_CONTROL1(ViewMsg_Extension_SetScriptingWhitelist, | |
| 374 Extension::ScriptingWhitelist /* extenison ids */) | |
| 375 | |
| 376 IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange, | 270 IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange, |
| 377 string16 /* value */, | 271 string16 /* value */, |
| 378 bool /* verbatim */, | 272 bool /* verbatim */, |
| 379 int /* selection_start */, | 273 int /* selection_start */, |
| 380 int /* selection_end */) | 274 int /* selection_end */) |
| 381 IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit, | 275 IPC_MESSAGE_ROUTED2(ViewMsg_SearchBoxSubmit, |
| 382 string16 /* value */, | 276 string16 /* value */, |
| 383 bool /* verbatim */) | 277 bool /* verbatim */) |
| 384 IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel) | 278 IPC_MESSAGE_ROUTED0(ViewMsg_SearchBoxCancel) |
| 385 IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize, | 279 IPC_MESSAGE_ROUTED1(ViewMsg_SearchBoxResize, |
| 386 gfx::Rect /* search_box_bounds */) | 280 gfx::Rect /* search_box_bounds */) |
| 387 IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant, | 281 IPC_MESSAGE_ROUTED4(ViewMsg_DetermineIfPageSupportsInstant, |
| 388 string16 /* value*/, | 282 string16 /* value*/, |
| 389 bool /* verbatim */, | 283 bool /* verbatim */, |
| 390 int /* selection_start */, | 284 int /* selection_start */, |
| 391 int /* selection_end */) | 285 int /* selection_end */) |
| 392 | 286 |
| 393 // Tell the renderer which browser window it's being attached to. | 287 // Tell the renderer which browser window it's being attached to. |
| 394 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateBrowserWindowId, | 288 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateBrowserWindowId, |
| 395 int /* id of browser window */) | 289 int /* id of browser window */) |
| 396 | 290 |
| 397 // Tell the renderer which type this view is. | 291 // Tell the renderer which type this view is. |
| 398 IPC_MESSAGE_ROUTED1(ViewMsg_NotifyRenderViewType, | 292 IPC_MESSAGE_ROUTED1(ViewMsg_NotifyRenderViewType, |
| 399 ViewType::Type /* view_type */) | 293 ViewType::Type /* view_type */) |
| 400 | 294 |
| 401 // Notification that renderer should run some JavaScript code. | |
| 402 IPC_MESSAGE_ROUTED1(ViewMsg_ExecuteCode, | |
| 403 ViewMsg_ExecuteCode_Params) | |
| 404 | |
| 405 // Tells the renderer to translate the page contents from one language to | 295 // Tells the renderer to translate the page contents from one language to |
| 406 // another. | 296 // another. |
| 407 IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage, | 297 IPC_MESSAGE_ROUTED4(ViewMsg_TranslatePage, |
| 408 int /* page id */, | 298 int /* page id */, |
| 409 std::string, /* the script injected in the page */ | 299 std::string, /* the script injected in the page */ |
| 410 std::string, /* BCP 47/RFC 5646 language code the page | 300 std::string, /* BCP 47/RFC 5646 language code the page |
| 411 is in */ | 301 is in */ |
| 412 std::string /* BCP 47/RFC 5646 language code to translate | 302 std::string /* BCP 47/RFC 5646 language code to translate |
| 413 to */) | 303 to */) |
| 414 | 304 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 428 | 318 |
| 429 IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats, | 319 IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats, |
| 430 WebKit::WebCache::UsageStats /* stats */) | 320 WebKit::WebCache::UsageStats /* stats */) |
| 431 | 321 |
| 432 // Tells the browser that content in the current page was blocked due to the | 322 // Tells the browser that content in the current page was blocked due to the |
| 433 // user's content settings. | 323 // user's content settings. |
| 434 IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked, | 324 IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked, |
| 435 ContentSettingsType, /* type of blocked content */ | 325 ContentSettingsType, /* type of blocked content */ |
| 436 std::string /* resource identifier */) | 326 std::string /* resource identifier */) |
| 437 | 327 |
| 438 // Used to get the extension message bundle. | |
| 439 IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetExtensionMessageBundle, | |
| 440 std::string /* extension id */, | |
| 441 SubstitutionMap /* message bundle */) | |
| 442 | |
| 443 // Specifies the URL as the first parameter (a wstring) and thumbnail as | 328 // Specifies the URL as the first parameter (a wstring) and thumbnail as |
| 444 // binary data as the second parameter. | 329 // binary data as the second parameter. |
| 445 IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail, | 330 IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail, |
| 446 GURL /* url */, | 331 GURL /* url */, |
| 447 ThumbnailScore /* score */, | 332 ThumbnailScore /* score */, |
| 448 SkBitmap /* bitmap */) | 333 SkBitmap /* bitmap */) |
| 449 | 334 |
| 450 // Send a snapshot of the tab contents to the render host. | 335 // Send a snapshot of the tab contents to the render host. |
| 451 IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot, | 336 IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot, |
| 452 SkBitmap /* bitmap */) | 337 SkBitmap /* bitmap */) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks, | 428 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks, |
| 544 std::vector<GURL> /* all savable resource links */, | 429 std::vector<GURL> /* all savable resource links */, |
| 545 std::vector<GURL> /* all referrers of resource links */, | 430 std::vector<GURL> /* all referrers of resource links */, |
| 546 std::vector<GURL> /* all frame links */) | 431 std::vector<GURL> /* all frame links */) |
| 547 | 432 |
| 548 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData, | 433 IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData, |
| 549 GURL /* frame's url */, | 434 GURL /* frame's url */, |
| 550 std::string /* data buffer */, | 435 std::string /* data buffer */, |
| 551 int32 /* complete status */) | 436 int32 /* complete status */) |
| 552 | 437 |
| 553 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidGetApplicationInfo, | |
| 554 int32 /* page_id */, | |
| 555 WebApplicationInfo) | |
| 556 | |
| 557 // Sent by the renderer to implement chrome.app.installApplication(). | |
| 558 IPC_MESSAGE_ROUTED1(ViewHostMsg_InstallApplication, | |
| 559 WebApplicationInfo) | |
| 560 | |
| 561 IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavicon, | 438 IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavicon, |
| 562 int /* Identifier of the request */, | 439 int /* Identifier of the request */, |
| 563 GURL /* URL of the image */, | 440 GURL /* URL of the image */, |
| 564 bool /* true if there was a network error */, | 441 bool /* true if there was a network error */, |
| 565 SkBitmap /* image_data */) | 442 SkBitmap /* image_data */) |
| 566 | 443 |
| 567 // Provide the browser process with information about the WebCore resource | 444 // Provide the browser process with information about the WebCore resource |
| 568 // cache. | 445 // cache. |
| 569 IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats, | 446 IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats, |
| 570 WebKit::WebCache::ResourceTypeStats) | 447 WebKit::WebCache::ResourceTypeStats) |
| 571 | 448 |
| 572 // A renderer sends this message when an extension process starts an API | |
| 573 // request. The browser will always respond with a ViewMsg_ExtensionResponse. | |
| 574 IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest, | |
| 575 ViewHostMsg_DomMessage_Params) | |
| 576 | |
| 577 // Notify the browser that the given extension added a listener to an event. | |
| 578 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionAddListener, | |
| 579 std::string /* extension_id */, | |
| 580 std::string /* name */) | |
| 581 | |
| 582 // Notify the browser that the given extension removed a listener from an | |
| 583 // event. | |
| 584 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionRemoveListener, | |
| 585 std::string /* extension_id */, | |
| 586 std::string /* name */) | |
| 587 | |
| 588 // Message sent from renderer to the browser to update the state of a command. | 449 // Message sent from renderer to the browser to update the state of a command. |
| 589 // The |command| parameter is a RenderViewCommand. The |checked_state| parameter | 450 // The |command| parameter is a RenderViewCommand. The |checked_state| parameter |
| 590 // is a CommandCheckedState. | 451 // is a CommandCheckedState. |
| 591 IPC_MESSAGE_ROUTED3(ViewHostMsg_CommandStateChanged, | 452 IPC_MESSAGE_ROUTED3(ViewHostMsg_CommandStateChanged, |
| 592 int /* command */, | 453 int /* command */, |
| 593 bool /* is_enabled */, | 454 bool /* is_enabled */, |
| 594 int /* checked_state */) | 455 int /* checked_state */) |
| 595 | 456 |
| 596 // Open a channel to all listening contexts owned by the extension with | |
| 597 // the given ID. This always returns a valid port ID which can be used for | |
| 598 // sending messages. If an error occurred, the opener will be notified | |
| 599 // asynchronously. | |
| 600 IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_OpenChannelToExtension, | |
| 601 int /* routing_id */, | |
| 602 std::string /* source_extension_id */, | |
| 603 std::string /* target_extension_id */, | |
| 604 std::string /* channel_name */, | |
| 605 int /* port_id */) | |
| 606 | |
| 607 // Get a port handle to the given tab. The handle can be used for sending | |
| 608 // messages to the extension. | |
| 609 IPC_SYNC_MESSAGE_CONTROL4_1(ViewHostMsg_OpenChannelToTab, | |
| 610 int /* routing_id */, | |
| 611 int /* tab_id */, | |
| 612 std::string /* extension_id */, | |
| 613 std::string /* channel_name */, | |
| 614 int /* port_id */) | |
| 615 | |
| 616 // Send a message to an extension process. The handle is the value returned | |
| 617 // by ViewHostMsg_OpenChannelTo*. | |
| 618 IPC_MESSAGE_ROUTED2(ViewHostMsg_ExtensionPostMessage, | |
| 619 int /* port_id */, | |
| 620 std::string /* message */) | |
| 621 | |
| 622 // Send a message to an extension process. The handle is the value returned | |
| 623 // by ViewHostMsg_OpenChannelTo*. | |
| 624 IPC_MESSAGE_CONTROL1(ViewHostMsg_ExtensionCloseChannel, | |
| 625 int /* port_id */) | |
| 626 | |
| 627 // Sent by the renderer process to acknowledge receipt of a | |
| 628 // ViewMsg_CSSInsertRequest message and css has been inserted into the frame. | |
| 629 IPC_MESSAGE_ROUTED0(ViewHostMsg_OnCSSInserted) | |
| 630 | 457 |
| 631 // Notifies the browser of the language (ISO 639_1 code language, such as fr, | 458 // Notifies the browser of the language (ISO 639_1 code language, such as fr, |
| 632 // en, zh...) of the current page. | 459 // en, zh...) of the current page. |
| 633 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageLanguageDetermined, | 460 IPC_MESSAGE_ROUTED1(ViewHostMsg_PageLanguageDetermined, |
| 634 std::string /* the language */) | 461 std::string /* the language */) |
| 635 | 462 |
| 636 // Notifies the browser that a page has been translated. | 463 // Notifies the browser that a page has been translated. |
| 637 IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated, | 464 IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated, |
| 638 int, /* page id */ | 465 int, /* page id */ |
| 639 std::string /* the original language */, | 466 std::string /* the original language */, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 664 // while performing stress testing. | 491 // while performing stress testing. |
| 665 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl, | 492 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl, |
| 666 int /* cmd */, | 493 int /* cmd */, |
| 667 int /* param */) | 494 int /* param */) |
| 668 | 495 |
| 669 // Register a new handler for URL requests with the given scheme. | 496 // Register a new handler for URL requests with the given scheme. |
| 670 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, | 497 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, |
| 671 std::string /* scheme */, | 498 std::string /* scheme */, |
| 672 GURL /* url */, | 499 GURL /* url */, |
| 673 string16 /* title */) | 500 string16 /* title */) |
| 674 | |
| 675 // Send from the renderer to the browser to return the script running result. | |
| 676 IPC_MESSAGE_ROUTED2(ViewHostMsg_ExecuteCodeFinished, | |
| 677 int, /* request id */ | |
| 678 bool /* whether the script ran successfully */) | |
| OLD | NEW |