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// IPC messages for page rendering. 6// Multiply-included message file, hence no include guard. 7 8#include "base/memory/shared_memory.h" 9#include "base/process/process.h" 10#include "base/strings/string16.h" 11#include "cc/output/begin_frame_args.h" 12#include "cc/output/compositor_frame.h" 13#include "cc/output/compositor_frame_ack.h" 14#include "content/common/browser_rendering_stats.h" 15#include "content/common/content_export.h" 16#include "content/common/content_param_traits.h" 17#include "content/common/cookie_data.h" 18#include "content/common/navigation_gesture.h" 19#include "content/common/pepper_renderer_instance_data.h" 20#include "content/common/view_message_enums.h" 21#include "content/common/webplugin_geometry.h" 22#include "content/port/common/input_event_ack_state.h" 23#include "content/public/common/common_param_traits.h" 24#include "content/public/common/context_menu_params.h" 25#include "content/public/common/favicon_url.h" 26#include "content/public/common/file_chooser_params.h" 27#include "content/public/common/frame_navigate_params.h" 28#include "content/public/common/javascript_message_type.h" 29#include "content/public/common/menu_item.h" 30#include "content/public/common/page_state.h" 31#include "content/public/common/page_zoom.h" 32#include "content/public/common/referrer.h" 33#include "content/public/common/renderer_preferences.h" 34#include "content/public/common/stop_find_action.h" 35#include "content/public/common/three_d_api_types.h" 36#include "content/public/common/window_container_type.h" 37#include "ipc/ipc_channel_handle.h" 38#include "ipc/ipc_message_macros.h" 39#include "ipc/ipc_platform_file.h" 40#include "media/audio/audio_parameters.h" 41#include "media/base/channel_layout.h" 42#include "media/base/media_log_event.h" 43#include "third_party/WebKit/public/platform/WebFloatPoint.h" 44#include "third_party/WebKit/public/platform/WebFloatRect.h" 45#include "third_party/WebKit/public/web/WebCompositionUnderline.h" 46#include "third_party/WebKit/public/web/WebFindOptions.h" 47#include "third_party/WebKit/public/web/WebMediaPlayerAction.h" 48#include "third_party/WebKit/public/web/WebPluginAction.h" 49#include "third_party/WebKit/public/web/WebPopupType.h" 50#include "third_party/WebKit/public/web/WebScreenInfo.h" 51#include "third_party/WebKit/public/web/WebTextDirection.h" 52#include "third_party/skia/include/core/SkBitmap.h" 53#include "ui/base/ime/text_input_mode.h" 54#include "ui/base/ime/text_input_type.h" 55#include "ui/base/range/range.h" 56#include "ui/base/ui_base_types.h" 57#include "ui/gfx/point.h" 58#include "ui/gfx/rect.h" 59#include "ui/gfx/rect_f.h" 60#include "ui/gfx/vector2d.h" 61#include "ui/gfx/vector2d_f.h" 62#include "ui/shell_dialogs/selected_file_info.h" 63 64#if defined(OS_MACOSX) 65#include "content/common/mac/font_descriptor.h" 66#endif 67 68#undef IPC_MESSAGE_EXPORT 69#define IPC_MESSAGE_EXPORT CONTENT_EXPORT 70 71#define IPC_MESSAGE_START ViewMsgStart 72 73IPC_ENUM_TRAITS(AccessibilityMode) 74IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) 75IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) 76IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) 77IPC_ENUM_TRAITS(WebKit::WebPluginAction::Type) 78IPC_ENUM_TRAITS(WebKit::WebPopupType) 79IPC_ENUM_TRAITS(WebKit::WebTextDirection) 80IPC_ENUM_TRAITS(WindowContainerType) 81IPC_ENUM_TRAITS(content::FaviconURL::IconType) 82IPC_ENUM_TRAITS(content::FileChooserParams::Mode) 83IPC_ENUM_TRAITS(content::JavaScriptMessageType) 84IPC_ENUM_TRAITS(content::MenuItem::Type) 85IPC_ENUM_TRAITS(content::NavigationGesture) 86IPC_ENUM_TRAITS(content::PageZoom) 87IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) 88IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) 89IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy, 90 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX) 91IPC_ENUM_TRAITS(content::StopFindAction) 92IPC_ENUM_TRAITS(content::ThreeDAPIType) 93IPC_ENUM_TRAITS(media::ChannelLayout) 94IPC_ENUM_TRAITS(media::MediaLogEvent::Type) 95IPC_ENUM_TRAITS(ui::MenuSourceType) 96IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX) 97IPC_ENUM_TRAITS(ui::TextInputType) 98 99#if defined(OS_MACOSX) 100IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) 101 IPC_STRUCT_TRAITS_MEMBER(font_name) 102 IPC_STRUCT_TRAITS_MEMBER(font_point_size) 103IPC_STRUCT_TRAITS_END() 104#endif 105 106IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCompositionUnderline) 107 IPC_STRUCT_TRAITS_MEMBER(startOffset) 108 IPC_STRUCT_TRAITS_MEMBER(endOffset) 109 IPC_STRUCT_TRAITS_MEMBER(color) 110 IPC_STRUCT_TRAITS_MEMBER(thick) 111IPC_STRUCT_TRAITS_END() 112 113IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFindOptions) 114 IPC_STRUCT_TRAITS_MEMBER(forward) 115 IPC_STRUCT_TRAITS_MEMBER(matchCase) 116 IPC_STRUCT_TRAITS_MEMBER(findNext) 117IPC_STRUCT_TRAITS_END() 118 119IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction) 120 IPC_STRUCT_TRAITS_MEMBER(type) 121 IPC_STRUCT_TRAITS_MEMBER(enable) 122IPC_STRUCT_TRAITS_END() 123 124IPC_STRUCT_TRAITS_BEGIN(WebKit::WebPluginAction) 125 IPC_STRUCT_TRAITS_MEMBER(type) 126 IPC_STRUCT_TRAITS_MEMBER(enable) 127IPC_STRUCT_TRAITS_END() 128 129IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatPoint) 130 IPC_STRUCT_TRAITS_MEMBER(x) 131 IPC_STRUCT_TRAITS_MEMBER(y) 132IPC_STRUCT_TRAITS_END() 133 134IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatRect) 135 IPC_STRUCT_TRAITS_MEMBER(x) 136 IPC_STRUCT_TRAITS_MEMBER(y) 137 IPC_STRUCT_TRAITS_MEMBER(width) 138 IPC_STRUCT_TRAITS_MEMBER(height) 139IPC_STRUCT_TRAITS_END() 140 141IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo) 142 IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor) 143 IPC_STRUCT_TRAITS_MEMBER(depth) 144 IPC_STRUCT_TRAITS_MEMBER(depthPerComponent) 145 IPC_STRUCT_TRAITS_MEMBER(isMonochrome) 146 IPC_STRUCT_TRAITS_MEMBER(rect) 147 IPC_STRUCT_TRAITS_MEMBER(availableRect) 148IPC_STRUCT_TRAITS_END() 149 150IPC_STRUCT_TRAITS_BEGIN(content::MenuItem) 151 IPC_STRUCT_TRAITS_MEMBER(label) 152 IPC_STRUCT_TRAITS_MEMBER(tool_tip) 153 IPC_STRUCT_TRAITS_MEMBER(type) 154 IPC_STRUCT_TRAITS_MEMBER(action) 155 IPC_STRUCT_TRAITS_MEMBER(rtl) 156 IPC_STRUCT_TRAITS_MEMBER(has_directional_override) 157 IPC_STRUCT_TRAITS_MEMBER(enabled) 158 IPC_STRUCT_TRAITS_MEMBER(checked) 159 IPC_STRUCT_TRAITS_MEMBER(submenu) 160IPC_STRUCT_TRAITS_END() 161 162IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) 163 IPC_STRUCT_TRAITS_MEMBER(media_type) 164 IPC_STRUCT_TRAITS_MEMBER(x) 165 IPC_STRUCT_TRAITS_MEMBER(y) 166 IPC_STRUCT_TRAITS_MEMBER(link_url) 167 IPC_STRUCT_TRAITS_MEMBER(link_text) 168 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url) 169 IPC_STRUCT_TRAITS_MEMBER(src_url) 170 IPC_STRUCT_TRAITS_MEMBER(is_image_blocked) 171 IPC_STRUCT_TRAITS_MEMBER(page_url) 172 IPC_STRUCT_TRAITS_MEMBER(keyword_url) 173 IPC_STRUCT_TRAITS_MEMBER(frame_url) 174 IPC_STRUCT_TRAITS_MEMBER(frame_page_state) 175 IPC_STRUCT_TRAITS_MEMBER(media_flags) 176 IPC_STRUCT_TRAITS_MEMBER(selection_text) 177 IPC_STRUCT_TRAITS_MEMBER(misspelled_word) 178 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash) 179 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions) 180 IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled) 181 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled) 182 IPC_STRUCT_TRAITS_MEMBER(is_editable) 183#if defined(OS_MACOSX) 184 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default) 185 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right) 186 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left) 187#endif // OS_MACOSX 188 IPC_STRUCT_TRAITS_MEMBER(edit_flags) 189 IPC_STRUCT_TRAITS_MEMBER(security_info) 190 IPC_STRUCT_TRAITS_MEMBER(frame_charset) 191 IPC_STRUCT_TRAITS_MEMBER(referrer_policy) 192 IPC_STRUCT_TRAITS_MEMBER(custom_context) 193 IPC_STRUCT_TRAITS_MEMBER(custom_items) 194 IPC_STRUCT_TRAITS_MEMBER(source_type) 195#if defined(OS_ANDROID) 196 IPC_STRUCT_TRAITS_MEMBER(selection_start) 197 IPC_STRUCT_TRAITS_MEMBER(selection_end) 198#endif 199IPC_STRUCT_TRAITS_END() 200 201IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) 202 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) 203 IPC_STRUCT_TRAITS_MEMBER(request_id) 204 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) 205IPC_STRUCT_TRAITS_END() 206 207IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL) 208 IPC_STRUCT_TRAITS_MEMBER(icon_url) 209 IPC_STRUCT_TRAITS_MEMBER(icon_type) 210IPC_STRUCT_TRAITS_END() 211 212IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) 213 IPC_STRUCT_TRAITS_MEMBER(mode) 214 IPC_STRUCT_TRAITS_MEMBER(title) 215 IPC_STRUCT_TRAITS_MEMBER(default_file_name) 216 IPC_STRUCT_TRAITS_MEMBER(accept_types) 217#if defined(OS_ANDROID) 218 IPC_STRUCT_TRAITS_MEMBER(capture) 219#endif 220IPC_STRUCT_TRAITS_END() 221 222IPC_STRUCT_TRAITS_BEGIN(content::FrameNavigateParams) 223 IPC_STRUCT_TRAITS_MEMBER(page_id) 224 IPC_STRUCT_TRAITS_MEMBER(url) 225 IPC_STRUCT_TRAITS_MEMBER(base_url) 226 IPC_STRUCT_TRAITS_MEMBER(referrer) 227 IPC_STRUCT_TRAITS_MEMBER(transition) 228 IPC_STRUCT_TRAITS_MEMBER(redirects) 229 IPC_STRUCT_TRAITS_MEMBER(should_update_history) 230 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) 231 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) 232 IPC_STRUCT_TRAITS_MEMBER(password_form) 233 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type) 234 IPC_STRUCT_TRAITS_MEMBER(socket_address) 235IPC_STRUCT_TRAITS_END() 236 237IPC_STRUCT_TRAITS_BEGIN(content::PepperRendererInstanceData) 238 IPC_STRUCT_TRAITS_MEMBER(render_process_id) 239 IPC_STRUCT_TRAITS_MEMBER(render_view_id) 240 IPC_STRUCT_TRAITS_MEMBER(document_url) 241 IPC_STRUCT_TRAITS_MEMBER(plugin_url) 242IPC_STRUCT_TRAITS_END() 243 244IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) 245 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) 246 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) 247 IPC_STRUCT_TRAITS_MEMBER(hinting) 248 IPC_STRUCT_TRAITS_MEMBER(use_autohinter) 249 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps) 250 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) 251 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning) 252 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) 253 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) 254 IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color) 255 IPC_STRUCT_TRAITS_MEMBER(track_color) 256 IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) 257 IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color) 258 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color) 259 IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color) 260 IPC_STRUCT_TRAITS_MEMBER(browser_handles_non_local_top_level_requests) 261 IPC_STRUCT_TRAITS_MEMBER(browser_handles_all_top_level_requests) 262 IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval) 263 IPC_STRUCT_TRAITS_MEMBER(use_custom_colors) 264 IPC_STRUCT_TRAITS_MEMBER(enable_referrers) 265 IPC_STRUCT_TRAITS_MEMBER(enable_do_not_track) 266 IPC_STRUCT_TRAITS_MEMBER(default_zoom_level) 267 IPC_STRUCT_TRAITS_MEMBER(user_agent_override) 268 IPC_STRUCT_TRAITS_MEMBER(accept_languages) 269 IPC_STRUCT_TRAITS_MEMBER(report_frame_name_changes) 270 IPC_STRUCT_TRAITS_MEMBER(touchpad_fling_profile) 271 IPC_STRUCT_TRAITS_MEMBER(touchscreen_fling_profile) 272 IPC_STRUCT_TRAITS_MEMBER(tap_multiple_targets_strategy) 273IPC_STRUCT_TRAITS_END() 274 275IPC_STRUCT_TRAITS_BEGIN(content::CookieData) 276 IPC_STRUCT_TRAITS_MEMBER(name) 277 IPC_STRUCT_TRAITS_MEMBER(value) 278 IPC_STRUCT_TRAITS_MEMBER(domain) 279 IPC_STRUCT_TRAITS_MEMBER(path) 280 IPC_STRUCT_TRAITS_MEMBER(expires) 281 IPC_STRUCT_TRAITS_MEMBER(http_only) 282 IPC_STRUCT_TRAITS_MEMBER(secure) 283 IPC_STRUCT_TRAITS_MEMBER(session) 284IPC_STRUCT_TRAITS_END() 285 286IPC_STRUCT_TRAITS_BEGIN(content::WebPluginGeometry) 287 IPC_STRUCT_TRAITS_MEMBER(window) 288 IPC_STRUCT_TRAITS_MEMBER(window_rect) 289 IPC_STRUCT_TRAITS_MEMBER(clip_rect) 290 IPC_STRUCT_TRAITS_MEMBER(cutout_rects) 291 IPC_STRUCT_TRAITS_MEMBER(rects_valid) 292 IPC_STRUCT_TRAITS_MEMBER(visible) 293IPC_STRUCT_TRAITS_END() 294 295IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) 296 IPC_STRUCT_TRAITS_MEMBER(id) 297 IPC_STRUCT_TRAITS_MEMBER(type) 298 IPC_STRUCT_TRAITS_MEMBER(params) 299 IPC_STRUCT_TRAITS_MEMBER(time) 300IPC_STRUCT_TRAITS_END() 301 302IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo) 303 IPC_STRUCT_TRAITS_MEMBER(file_path) 304 IPC_STRUCT_TRAITS_MEMBER(local_path) 305 IPC_STRUCT_TRAITS_MEMBER(display_name) 306IPC_STRUCT_TRAITS_END() 307 308IPC_STRUCT_TRAITS_BEGIN(content::BrowserRenderingStats) 309 IPC_STRUCT_TRAITS_MEMBER(input_event_count) 310 IPC_STRUCT_TRAITS_MEMBER(total_input_latency) 311 IPC_STRUCT_TRAITS_MEMBER(touch_ui_count) 312 IPC_STRUCT_TRAITS_MEMBER(total_touch_ui_latency) 313 IPC_STRUCT_TRAITS_MEMBER(touch_acked_count) 314 IPC_STRUCT_TRAITS_MEMBER(total_touch_acked_latency) 315 IPC_STRUCT_TRAITS_MEMBER(scroll_update_count) 316 IPC_STRUCT_TRAITS_MEMBER(total_scroll_update_latency) 317IPC_STRUCT_TRAITS_END() 318 319IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) 320 // Routing ID of the view initiating the open. 321 IPC_STRUCT_MEMBER(int, opener_id) 322 323 // True if this open request came in the context of a user gesture. 324 IPC_STRUCT_MEMBER(bool, user_gesture) 325 326 // Type of window requested. 327 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) 328 329 // The session storage namespace ID this view should use. 330 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) 331 332 // The name of the resulting frame that should be created (empty if none 333 // has been specified). 334 IPC_STRUCT_MEMBER(string16, frame_name) 335 336 // The frame identifier of the frame initiating the open. 337 IPC_STRUCT_MEMBER(int64, opener_frame_id) 338 339 // The URL of the frame initiating the open. 340 IPC_STRUCT_MEMBER(GURL, opener_url) 341 342 // The URL of the top frame containing the opener. 343 IPC_STRUCT_MEMBER(GURL, opener_top_level_frame_url) 344 345 // The security origin of the frame initiating the open. 346 IPC_STRUCT_MEMBER(GURL, opener_security_origin) 347 348 // Whether the opener will be suppressed in the new window, in which case 349 // scripting the new window is not allowed. 350 IPC_STRUCT_MEMBER(bool, opener_suppressed) 351 352 // Whether the window should be opened in the foreground, background, etc. 353 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) 354 355 // The URL that will be loaded in the new window (empty if none has been 356 // sepcified). 357 IPC_STRUCT_MEMBER(GURL, target_url) 358 359 // The referrer that will be used to load |target_url| (empty if none has 360 // been specified). 361 IPC_STRUCT_MEMBER(content::Referrer, referrer) 362 363 // The window features to use for the new view. 364 IPC_STRUCT_MEMBER(WebKit::WebWindowFeatures, features) 365IPC_STRUCT_END() 366 367IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params) 368 // URL for the worker script. 369 IPC_STRUCT_MEMBER(GURL, url) 370 371 // Name for a SharedWorker, otherwise empty string. 372 IPC_STRUCT_MEMBER(string16, name) 373 374 // The ID of the parent document (unique within parent renderer). 375 IPC_STRUCT_MEMBER(unsigned long long, document_id) 376 377 // RenderView routing id used to send messages back to the parent. 378 IPC_STRUCT_MEMBER(int, render_view_route_id) 379 380 // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed, 381 // a new unique ID is created and assigned to the worker. 382 IPC_STRUCT_MEMBER(int, route_id) 383 384 // The ID of the appcache the main shared worker script resource was loaded 385 // from, only valid for shared workers. 386 IPC_STRUCT_MEMBER(int64, script_resource_appcache_id) 387IPC_STRUCT_END() 388 389IPC_STRUCT_BEGIN(ViewHostMsg_DateTimeDialogValue_Params) 390 IPC_STRUCT_MEMBER(int, dialog_type) 391 IPC_STRUCT_MEMBER(int, year) 392 IPC_STRUCT_MEMBER(int, month) 393 IPC_STRUCT_MEMBER(int, day) 394 IPC_STRUCT_MEMBER(int, hour) 395 IPC_STRUCT_MEMBER(int, minute) 396 IPC_STRUCT_MEMBER(int, second) 397 IPC_STRUCT_MEMBER(int, week) 398 IPC_STRUCT_MEMBER(double, minimum) 399 IPC_STRUCT_MEMBER(double, maximum) 400IPC_STRUCT_END() 401 402IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params) 403 // The frame ID for the failure report. 404 IPC_STRUCT_MEMBER(int64, frame_id) 405 // True if this is the top-most frame. 406 IPC_STRUCT_MEMBER(bool, is_main_frame) 407 // Error code as reported in the DidFailProvisionalLoad callback. 408 IPC_STRUCT_MEMBER(int, error_code) 409 // An error message generated from the error_code. This can be an empty 410 // string if we were unable to find a meaningful description. 411 IPC_STRUCT_MEMBER(string16, error_description) 412 // The URL that the error is reported for. 413 IPC_STRUCT_MEMBER(GURL, url) 414 // True if the failure is the result of navigating to a POST again 415 // and we're going to show the POST interstitial. 416 IPC_STRUCT_MEMBER(bool, showing_repost_interstitial) 417IPC_STRUCT_END() 418 419// Parameters structure for ViewHostMsg_FrameNavigate, which has too many data 420// parameters to be reasonably put in a predefined IPC message. 421IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params, 422 content::FrameNavigateParams) 423 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams) 424 // The frame ID for this navigation. The frame ID uniquely identifies the 425 // frame the navigation happened in for a given renderer. 426 IPC_STRUCT_MEMBER(int64, frame_id) 427 428 // Information regarding the security of the connection (empty if the 429 // connection was not secure). 430 IPC_STRUCT_MEMBER(std::string, security_info) 431 432 // The gesture that initiated this navigation. 433 IPC_STRUCT_MEMBER(content::NavigationGesture, gesture) 434 435 // True if this was a post request. 436 IPC_STRUCT_MEMBER(bool, is_post) 437 438 // The POST body identifier. -1 if it doesn't exist. 439 IPC_STRUCT_MEMBER(int64, post_id) 440 441 // Whether the frame navigation resulted in no change to the documents within 442 // the page. For example, the navigation may have just resulted in scrolling 443 // to a named anchor. 444 IPC_STRUCT_MEMBER(bool, was_within_same_page) 445 446 // The status code of the HTTP request. 447 IPC_STRUCT_MEMBER(int, http_status_code) 448 449 // True if the connection was proxied. In this case, socket_address 450 // will represent the address of the proxy, rather than the remote host. 451 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy) 452 453 // Serialized history item state to store in the navigation entry. 454 IPC_STRUCT_MEMBER(content::PageState, page_state) 455 456 // Original request's URL. 457 IPC_STRUCT_MEMBER(GURL, original_request_url) 458 459 // User agent override used to navigate. 460 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) 461 462 // Notifies the browser that for this navigation, the session history was 463 // successfully cleared. 464 IPC_STRUCT_MEMBER(bool, history_list_was_cleared) 465IPC_STRUCT_END() 466 467IPC_STRUCT_BEGIN(ViewHostMsg_OpenURL_Params) 468 IPC_STRUCT_MEMBER(GURL, url) 469 IPC_STRUCT_MEMBER(content::Referrer, referrer) 470 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) 471 IPC_STRUCT_MEMBER(int64, frame_id) 472 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) 473 IPC_STRUCT_MEMBER(bool, user_gesture) 474IPC_STRUCT_END() 475 476IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) 477 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) 478 IPC_STRUCT_MEMBER(WebKit::WebTextDirection, anchor_dir) 479 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) 480 IPC_STRUCT_MEMBER(WebKit::WebTextDirection, focus_dir) 481 IPC_STRUCT_MEMBER(bool, is_anchor_first) 482IPC_STRUCT_END() 483 484// This message is used for supporting popup menus on Mac OS X using native 485// Cocoa controls. The renderer sends us this message which we use to populate 486// the popup menu. 487IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params) 488 // Position on the screen. 489 IPC_STRUCT_MEMBER(gfx::Rect, bounds) 490 491 // The height of each item in the menu. 492 IPC_STRUCT_MEMBER(int, item_height) 493 494 // The size of the font to use for those items. 495 IPC_STRUCT_MEMBER(double, item_font_size) 496 497 // The currently selected (displayed) item in the menu. 498 IPC_STRUCT_MEMBER(int, selected_item) 499 500 // The entire list of items in the popup menu. 501 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items) 502 503 // Whether items should be right-aligned. 504 IPC_STRUCT_MEMBER(bool, right_aligned) 505 506 // Whether this is a multi-select popup. 507 IPC_STRUCT_MEMBER(bool, allow_multiple_selection) 508IPC_STRUCT_END() 509 510IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params) 511 // The type of input field 512 IPC_STRUCT_MEMBER(ui::TextInputType, type) 513 514 // The value of the input field 515 IPC_STRUCT_MEMBER(std::string, value) 516 517 // The cursor position of the current selection start, or the caret position 518 // if nothing is selected 519 IPC_STRUCT_MEMBER(int, selection_start) 520 521 // The cursor position of the current selection end, or the caret position 522 // if nothing is selected 523 IPC_STRUCT_MEMBER(int, selection_end) 524 525 // The start position of the current composition, or -1 if there is none 526 IPC_STRUCT_MEMBER(int, composition_start) 527 528 // The end position of the current composition, or -1 if there is none 529 IPC_STRUCT_MEMBER(int, composition_end) 530 531 // Whether or not inline composition can be performed for the current input. 532 IPC_STRUCT_MEMBER(bool, can_compose_inline) 533 534 // Whether or not the IME should be shown as a result of this update. Even if 535 // true, the IME will only be shown if the type is appropriate (e.g. not 536 // TEXT_INPUT_TYPE_NONE). 537 IPC_STRUCT_MEMBER(bool, show_ime_if_needed) 538 539 // Whether an acknowledgement is required for this update. 540 IPC_STRUCT_MEMBER(bool, require_ack) 541IPC_STRUCT_END() 542 543IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) 544 // The bitmap to be painted into the view at the locations specified by 545 // update_rects. 546 IPC_STRUCT_MEMBER(TransportDIB::Id, bitmap) 547 548 // The position and size of the bitmap. 549 IPC_STRUCT_MEMBER(gfx::Rect, bitmap_rect) 550 551 // The scroll delta. Only one of the delta components can be non-zero, and if 552 // they are both zero, then it means there is no scrolling and the scroll_rect 553 // is ignored. 554 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_delta) 555 556 // The rectangular region to scroll. 557 IPC_STRUCT_MEMBER(gfx::Rect, scroll_rect) 558 559 // The scroll offset of the render view. 560 IPC_STRUCT_MEMBER(gfx::Vector2d, scroll_offset) 561 562 // The regions of the bitmap (in view coords) that contain updated pixels. 563 // In the case of scrolling, this includes the scroll damage rect. 564 IPC_STRUCT_MEMBER(std::vector<gfx::Rect>, copy_rects) 565 566 // The size of the RenderView when this message was generated. This is 567 // included so the host knows how large the view is from the perspective of 568 // the renderer process. This is necessary in case a resize operation is in 569 // progress. If auto-resize is enabled, this should update the corresponding 570 // view size. 571 IPC_STRUCT_MEMBER(gfx::Size, view_size) 572 573 // New window locations for plugin child windows. 574 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>, 575 plugin_window_moves) 576 577 // The following describes the various bits that may be set in flags: 578 // 579 // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK 580 // Indicates that this is a response to a ViewMsg_Resize message. 581 // 582 // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK 583 // Indicates that this is a response to a ViewMsg_WasShown message. 584 // 585 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK 586 // Indicates that this is a response to a ViewMsg_Repaint message. 587 // 588 // If flags is zero, then this message corresponds to an unsolicited paint 589 // request by the render view. Any of the above bits may be set in flags, 590 // which would indicate that this paint message is an ACK for multiple 591 // request messages. 592 IPC_STRUCT_MEMBER(int, flags) 593 594 // Whether or not the renderer expects a ViewMsg_UpdateRect_ACK for this 595 // update. True for 2D painting, but false for accelerated compositing. 596 IPC_STRUCT_MEMBER(bool, needs_ack) 597 598 // All the above coordinates are in DIP. This is the scale factor needed 599 // to convert them to pixels. 600 IPC_STRUCT_MEMBER(float, scale_factor) 601 602 // The latency information for the frame. Only valid when accelerated 603 // compositing is disabled. 604 IPC_STRUCT_MEMBER(ui::LatencyInfo, latency_info) 605IPC_STRUCT_END() 606 607IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params) 608 // The page_id for this navigation, or -1 if it is a new navigation. Back, 609 // Forward, and Reload navigations should have a valid page_id. If the load 610 // succeeds, then this page_id will be reflected in the resultant 611 // ViewHostMsg_FrameNavigate message. 612 IPC_STRUCT_MEMBER(int32, page_id) 613 614 // If page_id is -1, then pending_history_list_offset will also be -1. 615 // Otherwise, it contains the offset into the history list corresponding to 616 // the current navigation. 617 IPC_STRUCT_MEMBER(int, pending_history_list_offset) 618 619 // Informs the RenderView of where its current page contents reside in 620 // session history and the total size of the session history list. 621 IPC_STRUCT_MEMBER(int, current_history_list_offset) 622 IPC_STRUCT_MEMBER(int, current_history_list_length) 623 624 // Informs the RenderView the session history should be cleared. In that 625 // case, the RenderView needs to notify the browser that the clearing was 626 // succesful when the navigation commits. 627 IPC_STRUCT_MEMBER(bool, should_clear_history_list) 628 629 // The URL to load. 630 IPC_STRUCT_MEMBER(GURL, url) 631 632 // Base URL for use in WebKit's SubstituteData. 633 // Is only used with data: URLs. 634 IPC_STRUCT_MEMBER(GURL, base_url_for_data_url) 635 636 // History URL for use in WebKit's SubstituteData. 637 // Is only used with data: URLs. 638 IPC_STRUCT_MEMBER(GURL, history_url_for_data_url) 639 640 // The URL to send in the "Referer" header field. Can be empty if there is 641 // no referrer. 642 IPC_STRUCT_MEMBER(content::Referrer, referrer) 643 644 // The type of transition. 645 IPC_STRUCT_MEMBER(content::PageTransition, transition) 646 647 // Opaque history state (received by ViewHostMsg_UpdateState). 648 IPC_STRUCT_MEMBER(content::PageState, page_state) 649 650 // Type of navigation. 651 IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value, navigation_type) 652 653 // The time the request was created 654 IPC_STRUCT_MEMBER(base::Time, request_time) 655 656 // Extra headers (separated by \n) to send during the request. 657 IPC_STRUCT_MEMBER(std::string, extra_headers) 658 659 // The following two members identify a previous request that has been 660 // created before this navigation is being transferred to a new render view. 661 // This serves the purpose of recycling the old request. 662 // Unless this refers to a transferred navigation, these values are -1 and -1. 663 IPC_STRUCT_MEMBER(int, transferred_request_child_id) 664 IPC_STRUCT_MEMBER(int, transferred_request_request_id) 665 666 // Whether or not we should allow the url to download. 667 IPC_STRUCT_MEMBER(bool, allow_download) 668 669 // Whether or not the user agent override string should be used. 670 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) 671 672 // True if this was a post request. 673 IPC_STRUCT_MEMBER(bool, is_post) 674 675 // If is_post is true, holds the post_data information from browser. Empty 676 // otherwise. 677 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data) 678 679 // Whether or not this url should be allowed to access local file:// 680 // resources. 681 IPC_STRUCT_MEMBER(bool, can_load_local_resources) 682 683 // If not empty, which frame to navigate. 684 IPC_STRUCT_MEMBER(std::string, frame_to_navigate) 685 686 // The navigationStart time to expose to JS for this navigation. 687 IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start) 688IPC_STRUCT_END() 689 690IPC_STRUCT_BEGIN(ViewMsg_New_Params) 691 // Renderer-wide preferences. 692 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences) 693 694 // Preferences for this view. 695 IPC_STRUCT_MEMBER(WebPreferences, web_preferences) 696 697 // The ID of the view to be created. 698 IPC_STRUCT_MEMBER(int32, view_id) 699 700 // The ID of the main frame hosted in the view. 701 IPC_STRUCT_MEMBER(int32, main_frame_routing_id) 702 703 // The ID of the rendering surface. 704 IPC_STRUCT_MEMBER(int32, surface_id) 705 706 // The session storage namespace ID this view should use. 707 IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) 708 709 // The name of the frame associated with this view (or empty if none). 710 IPC_STRUCT_MEMBER(string16, frame_name) 711 712 // The route ID of the opener RenderView if we need to set one 713 // (MSG_ROUTING_NONE otherwise). 714 IPC_STRUCT_MEMBER(int, opener_route_id) 715 716 // Whether the RenderView should initially be swapped out. 717 IPC_STRUCT_MEMBER(bool, swapped_out) 718 719 // The initial page ID to use for this view, which must be larger than any 720 // existing navigation that might be loaded in the view. Page IDs are unique 721 // to a view and are only updated by the renderer after this initial value. 722 IPC_STRUCT_MEMBER(int32, next_page_id) 723 724 // The properties of the screen associated with the view. 725 IPC_STRUCT_MEMBER(WebKit::WebScreenInfo, screen_info) 726 727 // The accessibility mode of the renderer. 728 IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode) 729 730 // Specifies whether partially swapping composited buffers is 731 // allowed for a renderer. Partial swaps will be used if they are both 732 // allowed and supported. 733 IPC_STRUCT_MEMBER(bool, allow_partial_swap) 734IPC_STRUCT_END() 735 736IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params) 737 // The serialized script value. 738 IPC_STRUCT_MEMBER(string16, data) 739 740 // When sent to the browser, this is the routing ID of the source frame in 741 // the source process. The browser replaces it with the routing ID of the 742 // equivalent (swapped out) frame in the destination process. 743 IPC_STRUCT_MEMBER(int, source_routing_id) 744 745 // The origin of the source frame. 746 IPC_STRUCT_MEMBER(string16, source_origin) 747 748 // The origin for the message's target. 749 IPC_STRUCT_MEMBER(string16, target_origin) 750IPC_STRUCT_END() 751 752// Messages sent from the browser to the renderer. 753 754// Tells the renderer to cancel an opened date/time dialog. 755IPC_MESSAGE_ROUTED0(ViewMsg_CancelDateTimeDialog) 756 757// Get all savable resource links from current webpage, include main 758// frame and sub-frame. 759IPC_MESSAGE_ROUTED1(ViewMsg_GetAllSavableResourceLinksForCurrentPage, 760 GURL /* url of page which is needed to save */) 761 762// Get html data by serializing all frames of current page with lists 763// which contain all resource links that have local copy. 764IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, 765 std::vector<GURL> /* urls that have local copy */, 766 std::vector<base::FilePath> /* paths of local copy */, 767 base::FilePath /* local directory path */) 768 769// Tells the render side that a ViewHostMsg_LockMouse message has been 770// processed. |succeeded| indicates whether the mouse has been successfully 771// locked or not. 772IPC_MESSAGE_ROUTED1(ViewMsg_LockMouse_ACK, 773 bool /* succeeded */) 774// Tells the render side that the mouse has been unlocked. 775IPC_MESSAGE_ROUTED0(ViewMsg_MouseLockLost) 776 777// Screen was rotated. Dispatched to the onorientationchange javascript API. 778IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent, 779 int /* orientation */) 780 781// Sent by the browser when the parameters for vsync alignment have changed. 782IPC_MESSAGE_ROUTED2(ViewMsg_UpdateVSyncParameters, 783 base::TimeTicks /* timebase */, 784 base::TimeDelta /* interval */) 785 786// Set the top-level frame to the provided name. 787IPC_MESSAGE_ROUTED1(ViewMsg_SetName, 788 std::string /* frame_name */) 789 790// Sent to the RenderView when a new tab is swapped into an existing 791// tab and the histories need to be merged. The existing tab has a history of 792// |merged_history_length| which precedes the history of the new tab. All 793// page_ids >= |minimum_page_id| in the new tab are appended to the history. 794// 795// For example, suppose the history of page_ids in the new tab's RenderView 796// is [4 7 8]. This is merged into an existing tab with 3 history items, and 797// all pages in the new tab with page_id >= 7 are to be preserved. 798// The resulting page history is [-1 -1 -1 7 8]. 799IPC_MESSAGE_ROUTED2(ViewMsg_SetHistoryLengthAndPrune, 800 int, /* merge_history_length */ 801 int32 /* minimum_page_id */) 802 803// Tells the renderer to create a new view. 804// This message is slightly different, the view it takes (via 805// ViewMsg_New_Params) is the view to create, the message itself is sent as a 806// non-view control message. 807IPC_MESSAGE_CONTROL1(ViewMsg_New, 808 ViewMsg_New_Params) 809 810// Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. 811// similar to the new command, but used when the renderer created a view 812// first, and we need to update it. 813IPC_MESSAGE_ROUTED0(ViewMsg_CreatingNew_ACK) 814 815// Sends updated preferences to the renderer. 816IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, 817 content::RendererPreferences) 818 819// This passes a set of webkit preferences down to the renderer. 820IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, 821 WebPreferences) 822 823// Informs the renderer that the timezone has changed. 824IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange) 825 826// Tells the render view to close. 827IPC_MESSAGE_ROUTED0(ViewMsg_Close) 828 829IPC_STRUCT_BEGIN(ViewMsg_Resize_Params) 830 IPC_STRUCT_MEMBER(WebKit::WebScreenInfo, screen_info) 831 IPC_STRUCT_MEMBER(gfx::Size, new_size) 832 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size) 833 IPC_STRUCT_MEMBER(float, overdraw_bottom_height) 834 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect) 835 IPC_STRUCT_MEMBER(bool, is_fullscreen) 836IPC_STRUCT_END() 837 838// Tells the render view to change its size. A ViewHostMsg_UpdateRect message 839// is generated in response provided new_size is not empty and not equal to 840// the view's current size. The generated ViewHostMsg_UpdateRect message will 841// have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that 842// we don't have to fetch it every time WebKit asks for it. 843IPC_MESSAGE_ROUTED1(ViewMsg_Resize, 844 ViewMsg_Resize_Params /* params */) 845 846// Tells the render view that the resize rect has changed. 847IPC_MESSAGE_ROUTED1(ViewMsg_ChangeResizeRect, 848 gfx::Rect /* resizer_rect */) 849 850// Sent to inform the view that it was hidden. This allows it to reduce its 851// resource utilization. 852IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden) 853 854// Tells the render view that it is no longer hidden (see WasHidden), and the 855// render view is expected to respond with a full repaint if needs_repainting 856// is true. In that case, the generated ViewHostMsg_UpdateRect message will 857// have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this 858// message does not trigger a message in response. 859IPC_MESSAGE_ROUTED1(ViewMsg_WasShown, 860 bool /* needs_repainting */) 861 862// Sent to inform the view that it was swapped out. This allows the process to 863// exit if no other views are using it. 864IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut) 865 866// Sent to render the view into the supplied transport DIB, resize 867// the web widget to match the |page_size|, scale it by the 868// appropriate scale to make it fit the |desired_size|, and return 869// it. In response to this message, the host generates a 870// ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be 871// the right size to receive an RGBA image at the |desired_size|. 872// |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to 873// identify the PaintAtSize message the ACK belongs to. 874IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize, 875 TransportDIB::Handle /* dib_handle */, 876 int /* tag */, 877 gfx::Size /* page_size */, 878 gfx::Size /* desired_size */) 879 880// Tells the render view that a ViewHostMsg_UpdateRect message was processed. 881// This signals the render view that it can send another UpdateRect message. 882IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK) 883 884// Tells the render view that a SwapBuffers was completed. Typically, 885// SwapBuffers requests go from renderer -> GPU process -> browser. Most 886// platforms still use the GfxCxt3D Echo for receiving the SwapBuffers Ack. 887// Using Echo routes the ack from browser -> GPU process -> renderer, while this 888// Ack goes directly from browser -> renderer. This is not used for the threaded 889// compositor path. 890IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK) 891 892// Tells the render widget that a smooth scroll completed. 893IPC_MESSAGE_ROUTED0(ViewMsg_SmoothScrollCompleted) 894 895// Tells the renderer to focus the first (last if reverse is true) focusable 896// node. 897IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, 898 bool /* reverse */) 899 900// Executes custom context menu action that was provided from WebKit. 901IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction, 902 content::CustomContextMenuContext /* custom_context */, 903 unsigned /* action */) 904 905// Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that 906// the menu has been closed. 907IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed, 908 content::CustomContextMenuContext /* custom_context */) 909 910// Sent to inform the renderer to invoke a context menu. 911// The parameter specifies the location in the render view's coordinates. 912IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu, 913 gfx::Point /* location where menu should be shown */) 914 915// Tells the renderer to perform the specified navigation, interrupting any 916// existing navigation. 917IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params) 918 919IPC_MESSAGE_ROUTED0(ViewMsg_Stop) 920 921// Tells the renderer to reload the current focused frame 922IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame) 923 924// Sent when the user wants to search for a word on the page (find in page). 925IPC_MESSAGE_ROUTED3(ViewMsg_Find, 926 int /* request_id */, 927 string16 /* search_text */, 928 WebKit::WebFindOptions) 929 930// This message notifies the renderer that the user has closed the FindInPage 931// window (and what action to take regarding the selection). 932IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding, 933 content::StopFindAction /* action */) 934 935// Informs the renderer about various statistics the browser has (e.g. 936// latency) regarding the frames that have been displayed. 937IPC_MESSAGE_ROUTED1(ViewMsg_SetBrowserRenderingStats, 938 content::BrowserRenderingStats /* stats */) 939 940// Replaces a date time input field. 941IPC_MESSAGE_ROUTED1(ViewMsg_ReplaceDateTime, 942 ViewHostMsg_DateTimeDialogValue_Params /* value */) 943 944// Copies the image at location x, y to the clipboard (if there indeed is an 945// image at that location). 946IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt, 947 int /* x */, 948 int /* y */) 949 950// Tells the renderer to perform the given action on the media player 951// located at the given point. 952IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt, 953 gfx::Point, /* location */ 954 WebKit::WebMediaPlayerAction) 955 956// Tells the renderer to perform the given action on the plugin located at 957// the given point. 958IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt, 959 gfx::Point, /* location */ 960 WebKit::WebPluginAction) 961 962// Request for the renderer to evaluate an xpath to a frame and execute a 963// javascript: url in that frame's context. The message is completely 964// asynchronous and no corresponding response message is sent back. 965// 966// frame_xpath contains the modified xpath notation to identify an inner 967// subframe (starting from the root frame). It is a concatenation of 968// number of smaller xpaths delimited by '\n'. Each chunk in the string can 969// be evaluated to a frame in its parent-frame's context. 970// 971// Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0] 972// can be broken into 3 xpaths 973// /html/body/iframe evaluates to an iframe within the root frame 974// /html/body/div/iframe evaluates to an iframe within the level-1 iframe 975// /frameset/frame[0] evaluates to first frame within the level-2 iframe 976// 977// jscript_url is the string containing the javascript: url to be executed 978// in the target frame's context. The string should start with "javascript:" 979// and continue with a valid JS text. 980// 981// If the fourth parameter is true the result is sent back to the renderer 982// using the message ViewHostMsg_ScriptEvalResponse. 983// ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the 984// client can uniquely identify the request. 985IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest, 986 string16, /* frame_xpath */ 987 string16, /* jscript_url */ 988 int, /* ID */ 989 bool /* If true, result is sent back. */) 990 991// Posts a message from a frame in another process to the current renderer. 992IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent, 993 ViewMsg_PostMessage_Params) 994 995// Requests that the RenderView's main frame sets its opener to null. 996IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener) 997 998// Request for the renderer to evaluate an xpath to a frame and insert css 999// into that frame's document. See ViewMsg_ScriptEvalRequest for details on 1000// allowed xpath expressions. 1001IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest, 1002 string16, /* frame_xpath */ 1003 std::string /* css string */) 1004 1005// Change the zoom level for the current main frame. If the level actually 1006// changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser 1007// telling it what url got zoomed and what its current zoom level is. 1008IPC_MESSAGE_ROUTED1(ViewMsg_Zoom, 1009 content::PageZoom /* function */) 1010 1011// Set the zoom level for the current main frame. If the level actually 1012// changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser 1013// telling it what url got zoomed and what its current zoom level is. 1014IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel, 1015 double /* zoom_level */) 1016 1017// Zooms the page by the factor defined in the renderer. 1018IPC_MESSAGE_ROUTED3(ViewMsg_ZoomFactor, 1019 content::PageZoom, 1020 int /* zoom center_x */, 1021 int /* zoom center_y */) 1022 1023// Set the zoom level for a particular url that the renderer is in the 1024// process of loading. This will be stored, to be used if the load commits 1025// and ignored otherwise. 1026IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL, 1027 GURL /* url */, 1028 double /* zoom_level */) 1029 1030// Set the zoom level for a particular url, so all render views 1031// displaying this url can update their zoom levels to match. 1032// If scheme is empty, then only host is used for matching. 1033IPC_MESSAGE_CONTROL3(ViewMsg_SetZoomLevelForCurrentURL, 1034 std::string /* scheme */, 1035 std::string /* host */, 1036 double /* zoom_level */) 1037 1038// Change encoding of page in the renderer. 1039IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding, 1040 std::string /*new encoding name*/) 1041 1042// Reset encoding of page in the renderer back to default. 1043IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault) 1044 1045// Used to tell a render view whether it should expose various bindings 1046// that allow JS content extended privileges. See BindingsPolicy for valid 1047// flag values. 1048IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings, 1049 int /* enabled_bindings_flags */) 1050 1051// Tell the renderer to add a property to the WebUI binding object. This 1052// only works if we allowed WebUI bindings. 1053IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty, 1054 std::string /* property_name */, 1055 std::string /* property_value_json */) 1056 1057// This message starts/stop monitoring the input method status of the focused 1058// edit control of a renderer process. 1059// Parameters 1060// * is_active (bool) 1061// Indicates if an input method is active in the browser process. 1062// The possible actions when a renderer process receives this message are 1063// listed below: 1064// Value Action 1065// true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState 1066// to notify the input method status of the focused edit control. 1067// false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState. 1068IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive, 1069 bool /* is_active */) 1070 1071// This message sends a string being composed with an input method. 1072IPC_MESSAGE_ROUTED4( 1073 ViewMsg_ImeSetComposition, 1074 string16, /* text */ 1075 std::vector<WebKit::WebCompositionUnderline>, /* underlines */ 1076 int, /* selectiont_start */ 1077 int /* selection_end */) 1078 1079// This message confirms an ongoing composition. 1080IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition, 1081 string16 /* text */, 1082 ui::Range /* replacement_range */, 1083 bool /* keep_selection */) 1084 1085// Sets the text composition to be between the given start and end offsets 1086// in the currently focused editable field. 1087IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText, 1088 int /* start */, 1089 int /* end */, 1090 std::vector<WebKit::WebCompositionUnderline> /* underlines */) 1091 1092// Selects between the given start and end offsets in the currently focused 1093// editable field. 1094IPC_MESSAGE_ROUTED2(ViewMsg_SetEditableSelectionOffsets, 1095 int /* start */, 1096 int /* end */) 1097 1098// Deletes the current selection plus the specified number of characters before 1099// and after the selection or caret. 1100IPC_MESSAGE_ROUTED2(ViewMsg_ExtendSelectionAndDelete, 1101 int /* before */, 1102 int /* after */) 1103 1104// Used to notify the render-view that we have received a target URL. Used 1105// to prevent target URLs spamming the browser. 1106IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK) 1107 1108 1109// Sets the alternate error page URL (link doctor) for the renderer process. 1110IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL, 1111 GURL) 1112 1113// Notifies the color chooser client that the user selected a color. 1114IPC_MESSAGE_ROUTED2(ViewMsg_DidChooseColorResponse, unsigned, SkColor) 1115 1116// Notifies the color chooser client that the color chooser has ended. 1117IPC_MESSAGE_ROUTED1(ViewMsg_DidEndColorChooser, unsigned) 1118 1119IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse, 1120 std::vector<ui::SelectedFileInfo>) 1121 1122// Provides the results of directory enumeration. 1123IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse, 1124 int /* request_id */, 1125 std::vector<base::FilePath> /* files_in_directory */) 1126 1127// When a renderer sends a ViewHostMsg_Focus to the browser process, 1128// the browser has the option of sending a ViewMsg_CantFocus back to 1129// the renderer. 1130IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) 1131 1132// Instructs the renderer to invoke the frame's shouldClose method, which 1133// runs the onbeforeunload event handler. Expects the result to be returned 1134// via ViewHostMsg_ShouldClose. 1135IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) 1136 1137// Instructs the renderer to swap out for a cross-site transition, including 1138// running the unload event handler. Expects a SwapOut_ACK message when 1139// finished. 1140IPC_MESSAGE_ROUTED0(ViewMsg_SwapOut) 1141 1142// Instructs the renderer to close the current page, including running the 1143// onunload event handler. 1144// 1145// Expects a ClosePage_ACK message when finished. 1146IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) 1147 1148// Notifies the renderer about ui theme changes 1149IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) 1150 1151// Notifies the renderer that a paint is to be generated for the rectangle 1152// passed in. 1153IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, 1154 gfx::Size /* The view size to be repainted */) 1155 1156// Notification that a move or resize renderer's containing window has 1157// started. 1158IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted) 1159 1160IPC_MESSAGE_ROUTED2(ViewMsg_UpdateScreenRects, 1161 gfx::Rect /* view_screen_rect */, 1162 gfx::Rect /* window_screen_rect */) 1163 1164// Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and 1165// ViewHostMsg_ShowWidget to inform the renderer that the browser has 1166// processed the move. The browser may have ignored the move, but it finished 1167// processing. This is used because the renderer keeps a temporary cache of 1168// the widget position while these asynchronous operations are in progress. 1169IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK) 1170 1171// Used to instruct the RenderView to send back updates to the preferred size. 1172IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode) 1173 1174// Used to instruct the RenderView to automatically resize and send back 1175// updates for the new size. 1176IPC_MESSAGE_ROUTED2(ViewMsg_EnableAutoResize, 1177 gfx::Size /* min_size */, 1178 gfx::Size /* max_size */) 1179 1180// Used to instruct the RenderView to disalbe automatically resize. 1181IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize, 1182 gfx::Size /* new_size */) 1183 1184// Changes the text direction of the currently selected input field (if any). 1185IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection, 1186 WebKit::WebTextDirection /* direction */) 1187 1188// Tells the renderer to clear the focused node (if any). 1189IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode) 1190 1191// Make the RenderView transparent and render it onto a custom background. The 1192// background will be tiled in both directions if it is not large enough. 1193IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground, 1194 SkBitmap /* background */) 1195 1196// Used to tell the renderer not to add scrollbars with height and 1197// width below a threshold. 1198IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows, 1199 gfx::Size /* disable_scrollbar_size_limit */) 1200 1201// Activate/deactivate the RenderView (i.e., set its controls' tint 1202// accordingly, etc.). 1203IPC_MESSAGE_ROUTED1(ViewMsg_SetActive, 1204 bool /* active */) 1205 1206// Response message to ViewHostMsg_CreateShared/DedicatedWorker. 1207// Sent when the worker has started. 1208IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated) 1209 1210// The response to ViewHostMsg_AsyncOpenPepperFile. 1211IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenPepperFile_ACK, 1212 base::PlatformFileError /* error_code */, 1213 IPC::PlatformFileForTransit /* file descriptor */, 1214 int /* message_id */) 1215 1216// Tells the renderer that the network state has changed and that 1217// window.navigator.onLine should be updated for all WebViews. 1218IPC_MESSAGE_CONTROL1(ViewMsg_NetworkStateChanged, 1219 bool /* online */) 1220 1221// Reply to ViewHostMsg_OpenChannelToPpapiBroker 1222// Tells the renderer that the channel to the broker has been created. 1223IPC_MESSAGE_ROUTED2(ViewMsg_PpapiBrokerChannelCreated, 1224 base::ProcessId /* broker_pid */, 1225 IPC::ChannelHandle /* handle */) 1226 1227// Reply to ViewHostMsg_RequestPpapiBrokerPermission. 1228// Tells the renderer whether permission to access to PPAPI broker was granted 1229// or not. 1230IPC_MESSAGE_ROUTED1(ViewMsg_PpapiBrokerPermissionResult, 1231 bool /* result */) 1232 1233// Tells the renderer to empty its plugin list cache, optional reloading 1234// pages containing plugins. 1235IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache, 1236 bool /* reload_pages */) 1237 1238// Sent to the renderer when a popup window should no longer count against 1239// the current popup count (either because it's not a popup or because it was 1240// a generated by a user action). 1241IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) 1242 1243// Used to instruct the RenderView to go into "view source" mode. 1244IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) 1245 1246// Instructs the renderer to save the current page to MHTML. 1247IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML, 1248 int /* job_id */, 1249 IPC::PlatformFileForTransit /* file handle */) 1250 1251// Temporary message to diagnose an unexpected condition in WebContentsImpl. 1252IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData, 1253 GURL /* data */) 1254 1255// Change the accessibility mode in the renderer process. 1256IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode, 1257 AccessibilityMode) 1258 1259// An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer 1260// process to release the magnified image. 1261IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupDIB, 1262 TransportDIB::Handle /* DIB handle */) 1263 1264// Notifies the renderer that a snapshot has been retrieved. 1265IPC_MESSAGE_ROUTED3(ViewMsg_WindowSnapshotCompleted, 1266 int /* snapshot_id */, 1267 gfx::Size /* size */, 1268 std::vector<unsigned char> /* png */) 1269 1270// Tells the renderer to suspend/resume the webkit timers. 1271IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended, 1272 bool /* suspend */) 1273 1274#if defined(OS_ANDROID) 1275// Sent when the browser wants the bounding boxes of the current find matches. 1276// 1277// If match rects are already cached on the browser side, |current_version| 1278// should be the version number from the ViewHostMsg_FindMatchRects_Reply 1279// they came in, so the renderer can tell if it needs to send updated rects. 1280// Otherwise just pass -1 to always receive the list of rects. 1281// 1282// There must be an active search string (it is probably most useful to call 1283// this immediately after a ViewHostMsg_Find_Reply message arrives with 1284// final_update set to true). 1285IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects, 1286 int /* current_version */) 1287 1288// External popup menus. 1289IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems, 1290 bool /* user canceled the popup */, 1291 std::vector<int> /* selected indices */) 1292 1293// Tells the renderer to try to revert to the zoom level we were at before 1294// ViewMsg_ScrollFocusedEditableNodeIntoView was called. 1295IPC_MESSAGE_ROUTED0(ViewMsg_UndoScrollFocusedEditableNodeIntoView) 1296 1297// This message relays the beginning or end of a batch event in the IME. 1298IPC_MESSAGE_ROUTED1(ViewMsg_ImeBatchStateChanged, 1299 bool /* is_begin */) 1300 1301// Notifies the renderer whether hiding/showing the top controls is enabled 1302// and whether or not to animate to the proper state. 1303IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState, 1304 bool /* enable_hiding */, 1305 bool /* enable_showing */, 1306 bool /* animate */) 1307 1308IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded) 1309 1310// Sent by the browser when the renderer should generate a new frame. 1311IPC_MESSAGE_ROUTED1(ViewMsg_BeginFrame, 1312 cc::BeginFrameArgs /* args */) 1313 1314// Sent by the browser when an IME update that requires acknowledgement has been 1315// processed on the browser side. 1316IPC_MESSAGE_ROUTED0(ViewMsg_ImeEventAck) 1317 1318// Sent by the browser when we should pause video playback. 1319IPC_MESSAGE_ROUTED0(ViewMsg_PauseVideo); 1320 1321#elif defined(OS_MACOSX) 1322// Let the RenderView know its window has changed visibility. 1323IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility, 1324 bool /* visibile */) 1325 1326// Let the RenderView know its window's frame has changed. 1327IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged, 1328 gfx::Rect /* window frame */, 1329 gfx::Rect /* content view frame */) 1330 1331// Message sent from the browser to the renderer when the user starts or stops 1332// resizing the view. 1333IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize, 1334 bool /* enable */) 1335 1336// Tell the renderer that plugin IME has completed. 1337IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, 1338 string16 /* text */, 1339 int /* plugin_id */) 1340 1341// External popup menus. 1342IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem, 1343 int /* selected index, -1 means no selection */) 1344#endif 1345 1346// Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame. 1347IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck, 1348 uint32 /* output_surface_id */, 1349 cc::CompositorFrameAck /* ack */) 1350 1351// Sent by the browser to ask the renderer for a snapshot of the current view. 1352IPC_MESSAGE_ROUTED1(ViewMsg_Snapshot, 1353 gfx::Rect /* src_subrect */) 1354 1355// ----------------------------------------------------------------------------- 1356// Messages sent from the renderer to the browser. 1357 1358// Sent by the renderer when it is creating a new window. The browser creates 1359// a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is 1360// MSG_ROUTING_NONE, the view couldn't be created. 1361IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow, 1362 ViewHostMsg_CreateWindow_Params, 1363 int /* route_id */, 1364 int /* main_frame_route_id */, 1365 int32 /* surface_id */, 1366 int64 /* cloned_session_storage_namespace_id */) 1367 1368// Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like 1369// <select> dropdowns. This message is sent to the WebContentsImpl that 1370// contains the widget being created. 1371IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget, 1372 int /* opener_id */, 1373 WebKit::WebPopupType /* popup type */, 1374 int /* route_id */, 1375 int32 /* surface_id */) 1376 1377// Similar to ViewHostMsg_CreateWidget except the widget is a full screen 1378// window. 1379IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateFullscreenWidget, 1380 int /* opener_id */, 1381 int /* route_id */, 1382 int32 /* surface_id */) 1383 1384// Asks the browser for a unique routing ID. 1385IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID, 1386 int /* routing_id */) 1387 1388// Asks the browser for the default audio hardware configuration. 1389IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetAudioHardwareConfig, 1390 media::AudioParameters /* input parameters */, 1391 media::AudioParameters /* output parameters */) 1392 1393// Asks the browser for CPU usage of the renderer process in percents. 1394IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPUUsage, 1395 int /* CPU usage in percents */) 1396 1397// Asks the browser for the user's monitor profile. 1398IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetMonitorColorProfile, 1399 std::vector<char> /* profile */) 1400 1401// Asks the browser for the renderer process memory size stats. 1402IPC_SYNC_MESSAGE_CONTROL0_2(ViewHostMsg_GetProcessMemorySizes, 1403 size_t /* private_bytes */, 1404 size_t /* shared_bytes */) 1405 1406// These three messages are sent to the parent RenderViewHost to display the 1407// page/widget that was created by 1408// CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id 1409// refers to the id that was returned from the Create message above. 1410// The initial_position parameter is a rectangle in screen coordinates. 1411// 1412// FUTURE: there will probably be flags here to control if the result is 1413// in a new window. 1414IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView, 1415 int /* route_id */, 1416 WindowOpenDisposition /* disposition */, 1417 gfx::Rect /* initial_pos */, 1418 bool /* opened_by_user_gesture */) 1419 1420IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget, 1421 int /* route_id */, 1422 gfx::Rect /* initial_pos */) 1423 1424// Message to show a full screen widget. 1425IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget, 1426 int /* route_id */) 1427 1428// This message is sent after ViewHostMsg_ShowView to cause the RenderView 1429// to run in a modal fashion until it is closed. 1430IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_RunModal, 1431 int /* opener_id */) 1432 1433// Indicates the renderer is ready in response to a ViewMsg_New or 1434// a ViewMsg_CreatingNew_ACK. 1435IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady) 1436 1437// Indicates the renderer process is gone. This actually is sent by the 1438// browser process to itself, but keeps the interface cleaner. 1439IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderProcessGone, 1440 int, /* this really is base::TerminationStatus */ 1441 int /* exit_code */) 1442 1443// Sent by the renderer process to request that the browser close the view. 1444// This corresponds to the window.close() API, and the browser may ignore 1445// this message. Otherwise, the browser will generates a ViewMsg_Close 1446// message to close the view. 1447IPC_MESSAGE_ROUTED0(ViewHostMsg_Close) 1448 1449// Send in response to a ViewMsg_UpdateScreenRects so that the renderer can 1450// throttle these messages. 1451IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK) 1452 1453// Sent by the renderer process to request that the browser move the view. 1454// This corresponds to the window.resizeTo() and window.moveTo() APIs, and 1455// the browser may ignore this message. 1456IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, 1457 gfx::Rect /* position */) 1458 1459// Sent by the renderer process to notify the browser that the web page has 1460// programmatically scrolled. 1461IPC_MESSAGE_ROUTED1(ViewHostMsg_DidProgrammaticallyScroll, 1462 gfx::Vector2d /* scroll_point */) 1463 1464// Notifies the browser that a frame in the view has changed. This message 1465// has a lot of parameters and is packed/unpacked by functions defined in 1466// render_messages.h. 1467IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate, 1468 ViewHostMsg_FrameNavigate_Params) 1469 1470// Used to tell the parent that the user right clicked on an area of the 1471// content area, and a context menu should be shown for it. The params 1472// object contains information about the node(s) that were selected when the 1473// user right clicked. 1474IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu, content::ContextMenuParams) 1475 1476// Message to show a popup menu using native cocoa controls (Mac only). 1477IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup, 1478 ViewHostMsg_ShowPopup_Params) 1479 1480// Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied 1481// to ViewMsg_ScriptEvalRequest. The result has the value returned by the 1482// script as its only element, one of Null, Boolean, Integer, Real, Date, or 1483// String. 1484IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse, 1485 int /* id */, 1486 base::ListValue /* result */) 1487 1488// Result of string search in the page. 1489// Response to ViewMsg_Find with the results of the requested find-in-page 1490// search, the number of matches found and the selection rect (in screen 1491// coordinates) for the string found. If |final_update| is false, it signals 1492// that this is not the last Find_Reply message - more will be sent as the 1493// scoping effort continues. 1494IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply, 1495 int /* request_id */, 1496 int /* number of matches */, 1497 gfx::Rect /* selection_rect */, 1498 int /* active_match_ordinal */, 1499 bool /* final_update */) 1500 1501// Provides the result from running OnMsgShouldClose. |proceed| matches the 1502// return value of the the frame's shouldClose method (which includes the 1503// onbeforeunload handler): true if the user decided to proceed with leaving 1504// the page. 1505IPC_MESSAGE_ROUTED3(ViewHostMsg_ShouldClose_ACK, 1506 bool /* proceed */, 1507 base::TimeTicks /* before_unload_start_time */, 1508 base::TimeTicks /* before_unload_end_time */) 1509 1510// Indicates that the current renderer has swapped out, after a SwapOut 1511// message. 1512IPC_MESSAGE_ROUTED0(ViewHostMsg_SwapOut_ACK) 1513 1514// Indicates that the current page has been closed, after a ClosePage 1515// message. 1516IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK) 1517 1518// Notifies the browser that media has started/stopped playing. 1519IPC_MESSAGE_ROUTED4(ViewHostMsg_MediaNotification, 1520 int64 /* player_cookie, distinguishes instances */, 1521 bool /* has_video */, 1522 bool /* has_audio */, 1523 bool /* is_playing */) 1524 1525// Notifies the browser that we have session history information. 1526// page_id: unique ID that allows us to distinguish between history entries. 1527IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState, 1528 int32 /* page_id */, 1529 content::PageState /* state */) 1530 1531// Notifies the browser that a document has been loaded in a frame. 1532IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame, 1533 int64 /* frame_id */) 1534 1535// Notifies the browser that a frame finished loading. 1536IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad, 1537 int64 /* frame_id */, 1538 GURL /* validated_url */, 1539 bool /* is_main_frame */) 1540 1541// Changes the title for the page in the UI when the page is navigated or the 1542// title changes. 1543IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle, 1544 int32 /* page_id */, 1545 string16 /* title */, 1546 WebKit::WebTextDirection /* title direction */) 1547 1548// Change the encoding name of the page in UI when the page has detected 1549// proper encoding name. 1550IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding, 1551 std::string /* new encoding name */) 1552 1553// Notifies the browser that we want to show a destination url for a potential 1554// action (e.g. when the user is hovering over a link). 1555IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL, 1556 int32, 1557 GURL) 1558 1559// Sent when the renderer starts loading the page. This corresponds to 1560// WebKit's notion of the throbber starting. Note that sometimes you may get 1561// duplicates of these during a single load. 1562IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading) 1563 1564// Sent when the renderer is done loading a page. This corresponds to WebKit's 1565// notion of the throbber stopping. 1566IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading) 1567 1568// Sent when the renderer main frame has made progress loading. 1569IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress, 1570 double /* load_progress */) 1571 1572// Sent when the renderer main frame sets its opener to null, disowning it for 1573// the lifetime of the window. 1574IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisownOpener) 1575 1576// Sent when the document element is available for the top-level frame. This 1577// happens after the page starts loading, but before all resources are 1578// finished. 1579IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame) 1580 1581// Sent when after the onload handler has been invoked for the document 1582// in the top-level frame. 1583IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, 1584 int32 /* page_id */) 1585 1586// Sent when the renderer loads a resource from its memory cache. 1587// The security info is non empty if the resource was originally loaded over 1588// a secure connection. 1589// Note: May only be sent once per URL per frame per committed load. 1590IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache, 1591 GURL /* url */, 1592 std::string /* security info */, 1593 std::string /* http method */, 1594 std::string /* mime type */, 1595 ResourceType::Type /* resource type */) 1596 1597// Sent when the renderer displays insecure content in a secure page. 1598IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent) 1599 1600// Sent when the renderer runs insecure content in a secure origin. 1601IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent, 1602 std::string /* security_origin */, 1603 GURL /* target URL */) 1604 1605// Sent when the renderer starts a provisional load for a frame. 1606IPC_MESSAGE_ROUTED4(ViewHostMsg_DidStartProvisionalLoadForFrame, 1607 int64 /* frame_id */, 1608 int64 /* parent_frame_id */, 1609 bool /* true if it is the main frame */, 1610 GURL /* url */) 1611 1612IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError, 1613 int64 /* frame_id */, 1614 GURL /* validated_url */, 1615 bool /* is_main_frame */, 1616 int /* error_code */, 1617 string16 /* error_description */) 1618 1619// Sent when the renderer fails a provisional load with an error. 1620IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFailProvisionalLoadWithError, 1621 ViewHostMsg_DidFailProvisionalLoadWithError_Params) 1622 1623// Tells the render view that a ViewHostMsg_PaintAtSize message was 1624// processed, and the DIB is ready for use. |tag| has the same value that 1625// the tag sent along with ViewMsg_PaintAtSize. 1626IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK, 1627 int /* tag */, 1628 gfx::Size /* size */) 1629 1630// Sent to update part of the view. In response to this message, the host 1631// generates a ViewMsg_UpdateRect_ACK message. 1632IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect, 1633 ViewHostMsg_UpdateRect_Params) 1634 1635// Sent to unblock the browser's UI thread if it is waiting on an UpdateRect, 1636// which may get delayed until the browser's UI unblocks. 1637IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed) 1638 1639// Sent by the renderer when accelerated compositing is enabled or disabled to 1640// notify the browser whether or not is should do painting. 1641IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing, 1642 bool /* true if the accelerated compositor is actve */) 1643 1644IPC_STRUCT_BEGIN(ViewHostMsg_BeginSmoothScroll_Params) 1645 IPC_STRUCT_MEMBER(bool, scroll_down) 1646 IPC_STRUCT_MEMBER(int, pixels_to_scroll) 1647 IPC_STRUCT_MEMBER(int, mouse_event_x) 1648 IPC_STRUCT_MEMBER(int, mouse_event_y) 1649IPC_STRUCT_END() 1650 1651IPC_MESSAGE_ROUTED1(ViewHostMsg_BeginSmoothScroll, 1652 ViewHostMsg_BeginSmoothScroll_Params /* params */) 1653 1654IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus) 1655IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur) 1656 1657// Message sent from renderer to the browser when focus changes inside the 1658// webpage. The parameter says whether the newly focused element needs 1659// keyboard input (true for textfields, text areas and content editable divs). 1660IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged, 1661 bool /* is_editable_node */) 1662 1663IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, 1664 WebCursor) 1665 1666// Used to set a cookie. The cookie is set asynchronously, but will be 1667// available to a subsequent ViewHostMsg_GetCookies request. 1668IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie, 1669 GURL /* url */, 1670 GURL /* first_party_for_cookies */, 1671 std::string /* cookie */) 1672 1673// Used to get cookies for the given URL. This may block waiting for a 1674// previous SetCookie message to be processed. 1675IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies, 1676 GURL /* url */, 1677 GURL /* first_party_for_cookies */, 1678 std::string /* cookies */) 1679 1680// Used to get raw cookie information for the given URL. This may block 1681// waiting for a previous SetCookie message to be processed. 1682IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies, 1683 GURL /* url */, 1684 GURL /* first_party_for_cookies */, 1685 std::vector<content::CookieData> 1686 /* raw_cookies */) 1687 1688// Used to delete cookie for the given URL and name 1689IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie, 1690 GURL /* url */, 1691 std::string /* cookie_name */) 1692 1693// Used to check if cookies are enabled for the given URL. This may block 1694// waiting for a previous SetCookie message to be processed. 1695IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled, 1696 GURL /* url */, 1697 GURL /* first_party_for_cookies */, 1698 bool /* cookies_enabled */) 1699 1700// Used to get the list of plugins 1701IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins, 1702 bool /* refresh*/, 1703 std::vector<content::WebPluginInfo> /* plugins */) 1704 1705// Return information about a plugin for the given URL and MIME 1706// type. If there is no matching plugin, |found| is false. 1707// |actual_mime_type| is the actual mime type supported by the 1708// found plugin. 1709IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo, 1710 int /* routing_id */, 1711 GURL /* url */, 1712 GURL /* page_url */, 1713 std::string /* mime_type */, 1714 bool /* found */, 1715 content::WebPluginInfo /* plugin info */, 1716 std::string /* actual_mime_type */) 1717 1718// A renderer sends this to the browser process when it wants to 1719// create a plugin. The browser will create the plugin process if 1720// necessary, and will return a handle to the channel on success. 1721// On error an empty string is returned. 1722IPC_SYNC_MESSAGE_CONTROL4_2(ViewHostMsg_OpenChannelToPlugin, 1723 int /* routing_id */, 1724 GURL /* url */, 1725 GURL /* page_url */, 1726 std::string /* mime_type */, 1727 IPC::ChannelHandle /* channel_handle */, 1728 content::WebPluginInfo /* info */) 1729 1730#if defined(OS_WIN) 1731IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated, 1732 gfx::NativeViewId /* dummy_activation_window */) 1733 1734IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowDestroyed, 1735 gfx::NativeViewId /* dummy_activation_window */) 1736#endif 1737 1738// Get the list of proxies to use for |url|, as a semicolon delimited list 1739// of "<TYPE> <HOST>:<PORT>" | "DIRECT". 1740IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_ResolveProxy, 1741 GURL /* url */, 1742 bool /* result */, 1743 std::string /* proxy list */) 1744 1745// A renderer sends this to the browser process when it wants to create a 1746// worker. The browser will create the worker process if necessary, and 1747// will return the route id on success. On error returns MSG_ROUTING_NONE. 1748IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWorker, 1749 ViewHostMsg_CreateWorker_Params, 1750 int /* route_id */) 1751 1752// This message is sent to the browser to see if an instance of this shared 1753// worker already exists. If so, it returns exists == true. If a 1754// non-empty name is passed, also validates that the url matches the url of 1755// the existing worker. If a matching worker is found, the passed-in 1756// document_id is associated with that worker, to ensure that the worker 1757// stays alive until the document is detached. 1758// The route_id returned can be used to forward messages to the worker via 1759// ForwardToWorker if it exists, otherwise it should be passed in to any 1760// future call to CreateWorker to avoid creating duplicate workers. 1761IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LookupSharedWorker, 1762 ViewHostMsg_CreateWorker_Params, 1763 bool /* exists */, 1764 int /* route_id */, 1765 bool /* url_mismatch */) 1766 1767// A renderer sends this to the browser process when a document has been 1768// detached. The browser will use this to constrain the lifecycle of worker 1769// processes (SharedWorkers are shut down when their last associated document 1770// is detached). 1771IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached, 1772 uint64 /* document_id */) 1773 1774// Wraps an IPC message that's destined to the worker on the renderer->browser 1775// hop. 1776IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker, 1777 IPC::Message /* message */) 1778 1779// Tells the browser that a specific Appcache manifest in the current page 1780// was accessed. 1781IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed, 1782 GURL /* manifest url */, 1783 bool /* blocked by policy */) 1784 1785// Initiates a download based on user actions like 'ALT+click'. 1786IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl, 1787 GURL /* url */, 1788 content::Referrer /* referrer */, 1789 string16 /* suggested_name */) 1790 1791// Used to go to the session history entry at the given offset (ie, -1 will 1792// return the "back" item). 1793IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset, 1794 int /* offset (from current) of history item to get */) 1795 1796// Sent from an inactive renderer for the browser to route to the active 1797// renderer, instructing it to close. 1798IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent) 1799 1800// Sent to the browser from an inactive renderer to post a message to the 1801// active renderer. 1802IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent, 1803 ViewMsg_PostMessage_Params) 1804 1805IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage, 1806 string16 /* in - alert message */, 1807 string16 /* in - default prompt */, 1808 GURL /* in - originating page URL */, 1809 content::JavaScriptMessageType /* in - type */, 1810 bool /* out - success */, 1811 string16 /* out - user_input field */) 1812 1813// Requests that the given URL be opened in the specified manner. 1814IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL, ViewHostMsg_OpenURL_Params) 1815 1816// Notifies that the preferred size of the content changed. 1817IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange, 1818 gfx::Size /* pref_size */) 1819 1820// Notifies that the scroll offset changed. 1821// This is different from ViewHostMsg_UpdateRect in that ViewHostMsg_UpdateRect 1822// is not sent at all when threaded compositing is enabled while 1823// ViewHostMsg_DidChangeScrollOffset works properly in this case. 1824IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset) 1825 1826// Notifies that the pinned-to-side state of the content changed. 1827IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, 1828 bool /* pinned_to_left */, 1829 bool /* pinned_to_right */) 1830 1831// Notifies that the scrollbars-visible state of the content changed. 1832IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame, 1833 bool /* has_horizontal_scrollbar */, 1834 bool /* has_vertical_scrollbar */) 1835 1836// Notifies that the number of JavaScript scroll handlers changed. 1837IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeNumWheelEvents, 1838 int /* count */) 1839 1840// Notifies whether there are JavaScript touch event handlers or not. 1841IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers, 1842 bool /* has_handlers */) 1843 1844// A message from HTML-based UI. When (trusted) Javascript calls 1845// send(message, args), this message is sent to the browser. 1846IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend, 1847 GURL /* source_url */, 1848 std::string /* message */, 1849 base::ListValue /* args */) 1850 1851// Requests a snapshot of the given window. 1852IPC_MESSAGE_ROUTED1(ViewHostMsg_GetWindowSnapshot, 1853 int /* snapshot_id */) 1854 1855// A renderer sends this to the browser process when it wants to create a ppapi 1856// plugin. The browser will create the plugin process if necessary, and will 1857// return a handle to the channel on success. 1858// 1859// The plugin_child_id is the ChildProcessHost ID assigned in the browser 1860// process. This ID is valid only in the context of the browser process and is 1861// used to identify the proper process when the renderer notifies it that the 1862// plugin is hung. 1863// 1864// On error an empty string and null handles are returned. 1865IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_OpenChannelToPepperPlugin, 1866 base::FilePath /* path */, 1867 IPC::ChannelHandle /* handle to channel */, 1868 base::ProcessId /* plugin_pid */, 1869 int /* plugin_child_id */) 1870 1871// Notification that a plugin has created a new plugin instance. The parameters 1872// indicate: 1873// -The plugin process ID that we're creating the instance for. 1874// -The instance ID of the instance being created. 1875// -A PepperRendererInstanceData struct which contains properties from the 1876// renderer which are associated with the plugin instance. This includes the 1877// routing ID of the associated render view and the URL of plugin. 1878// -Whether the plugin we're creating an instance for is external or internal. 1879// 1880// This message must be sync even though it returns no parameters to avoid 1881// a race condition with the plugin process. The plugin process sends messages 1882// to the browser that assume the browser knows about the instance. We need to 1883// make sure that the browser actually knows about the instance before we tell 1884// the plugin to run. 1885IPC_SYNC_MESSAGE_CONTROL4_0( 1886 ViewHostMsg_DidCreateOutOfProcessPepperInstance, 1887 int /* plugin_child_id */, 1888 int32 /* pp_instance */, 1889 content::PepperRendererInstanceData /* creation_data */, 1890 bool /* is_external */) 1891 1892// Notification that a plugin has destroyed an instance. This is the opposite of 1893// the "DidCreate" message above. 1894IPC_MESSAGE_CONTROL3(ViewHostMsg_DidDeleteOutOfProcessPepperInstance, 1895 int /* plugin_child_id */, 1896 int32 /* pp_instance */, 1897 bool /* is_external */) 1898 1899// Message from the renderer to the browser indicating the in-process instance 1900// has been created. 1901IPC_MESSAGE_CONTROL2(ViewHostMsg_DidCreateInProcessInstance, 1902 int32 /* instance */, 1903 content::PepperRendererInstanceData /* instance_data */) 1904 1905// Message from the renderer to the browser indicating the in-process instance 1906// has been destroyed. 1907IPC_MESSAGE_CONTROL1(ViewHostMsg_DidDeleteInProcessInstance, 1908 int32 /* instance */) 1909 1910// A renderer sends this to the browser process when it wants to 1911// create a ppapi broker. The browser will create the broker process 1912// if necessary, and will return a handle to the channel on success. 1913// On error an empty string is returned. 1914// The browser will respond with ViewMsg_PpapiBrokerChannelCreated. 1915IPC_MESSAGE_CONTROL2(ViewHostMsg_OpenChannelToPpapiBroker, 1916 int /* routing_id */, 1917 base::FilePath /* path */) 1918 1919// Opens a Pepper file asynchronously. The response returns a file descriptor 1920// and an error code from base/platform_file.h. 1921IPC_MESSAGE_CONTROL4(ViewHostMsg_AsyncOpenPepperFile, 1922 int /* routing_id */, 1923 base::FilePath /* file path */, 1924 int /* pp_open_flags */, 1925 int /* message_id */) 1926 1927// A renderer sends this to the browser process when it wants to access a PPAPI 1928// broker. In contrast to ViewHostMsg_OpenChannelToPpapiBroker, this is called 1929// for every connection. 1930// The browser will respond with ViewMsg_PpapiBrokerPermissionResult. 1931IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission, 1932 int /* routing_id */, 1933 GURL /* document_url */, 1934 base::FilePath /* plugin_path */) 1935 1936#if defined(USE_X11) 1937// A renderer sends this when it needs a browser-side widget for 1938// hosting a windowed plugin. id is the XID of the plugin window, for which 1939// the container is created. 1940IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer, 1941 gfx::PluginWindowHandle /* id */) 1942 1943// Destroy a plugin container previously created using CreatePluginContainer. 1944// id is the XID of the plugin window corresponding to the container that is 1945// to be destroyed. 1946IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer, 1947 gfx::PluginWindowHandle /* id */) 1948#endif 1949 1950// Send the tooltip text for the current mouse position to the browser. 1951IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, 1952 string16 /* tooltip text string */, 1953 WebKit::WebTextDirection /* text direction hint */) 1954 1955IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK) 1956IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK) 1957 1958// Notification that the text selection has changed. 1959// Note: The secound parameter is the character based offset of the string16 1960// text in the document. 1961IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged, 1962 string16 /* text covers the selection range */, 1963 size_t /* the offset of the text in the document */, 1964 ui::Range /* selection range in the document */) 1965 1966// Notification that the selection bounds have changed. 1967IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged, 1968 ViewHostMsg_SelectionBounds_Params) 1969 1970// Asks the browser to open the color chooser. 1971IPC_MESSAGE_ROUTED2(ViewHostMsg_OpenColorChooser, 1972 int /* id */, 1973 SkColor /* color */) 1974 1975// Asks the browser to end the color chooser. 1976IPC_MESSAGE_ROUTED1(ViewHostMsg_EndColorChooser, int /* id */) 1977 1978// Change the selected color in the color chooser. 1979IPC_MESSAGE_ROUTED2(ViewHostMsg_SetSelectedColorInColorChooser, 1980 int /* id */, 1981 SkColor /* color */) 1982 1983// Asks the browser to display the file chooser. The result is returned in a 1984// ViewHost_RunFileChooserResponse message. 1985IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser, 1986 content::FileChooserParams) 1987 1988// Asks the browser to enumerate a directory. This is equivalent to running 1989// the file chooser in directory-enumeration mode and having the user select 1990// the given directory. The result is returned in a 1991// ViewMsg_EnumerateDirectoryResponse message. 1992IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory, 1993 int /* request_id */, 1994 base::FilePath /* file_path */) 1995 1996// Tells the browser to move the focus to the next (previous if reverse is 1997// true) focusable element. 1998IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, 1999 bool /* reverse */) 2000 2001// Required for opening a date/time dialog 2002IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, 2003 ViewHostMsg_DateTimeDialogValue_Params /* value */) 2004 2005IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged, 2006 ui::TextInputType /* TextInputType of the focused node */, 2007 bool /* can_compose_inline in the focused node */, 2008 ui::TextInputMode /* TextInputMode of the focused node */) 2009 2010// Required for updating text input state. 2011IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, 2012 ViewHostMsg_TextInputState_Params /* input state params */) 2013 2014// Required for cancelling an ongoing input method composition. 2015IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition) 2016 2017// WebKit and JavaScript error messages to log to the console 2018// or debugger UI. 2019IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole, 2020 int32, /* log level */ 2021 string16, /* msg */ 2022 int32, /* line number */ 2023 string16 /* source id */) 2024 2025// Sent by the renderer process to indicate that a plugin instance has crashed. 2026// Note: |plugin_pid| should not be trusted. The corresponding process has 2027// probably died. Moreover, the ID may have been reused by a new process. Any 2028// usage other than displaying it in a prompt to the user is very likely to be 2029// wrong. 2030IPC_MESSAGE_ROUTED2(ViewHostMsg_CrashedPlugin, 2031 base::FilePath /* plugin_path */, 2032 base::ProcessId /* plugin_pid */) 2033 2034// Displays a box to confirm that the user wants to navigate away from the 2035// page. Replies true if yes, false otherwise, the reply string is ignored, 2036// but is included so that we can use OnJavaScriptMessageBoxClosed. 2037IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm, 2038 GURL, /* in - originating frame URL */ 2039 string16 /* in - alert message */, 2040 bool /* in - is a reload */, 2041 bool /* out - success */, 2042 string16 /* out - This is ignored.*/) 2043 2044// Sent when a provisional load on the main frame redirects. 2045IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad, 2046 int /* page_id */, 2047 GURL /* last url */, 2048 GURL /* url redirected to */) 2049 2050// Sent when the renderer changes the zoom level for a particular url, so the 2051// browser can update its records. If remember is true, then url is used to 2052// update the zoom level for all pages in that site. Otherwise, the render 2053// view's id is used so that only the menu is updated. 2054IPC_MESSAGE_ROUTED3(ViewHostMsg_DidZoomURL, 2055 double /* zoom_level */, 2056 bool /* remember */, 2057 GURL /* url */) 2058 2059// Updates the minimum/maximum allowed zoom percent for this tab from the 2060// default values. If |remember| is true, then the zoom setting is applied to 2061// other pages in the site and is saved, otherwise it only applies to this 2062// tab. 2063IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateZoomLimits, 2064 int /* minimum_percent */, 2065 int /* maximum_percent */, 2066 bool /* remember */) 2067 2068// Notify the browser that this render process can or can't be suddenly 2069// terminated. 2070IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged, 2071 bool /* enabled */) 2072 2073// Informs the browser of updated frame names. 2074IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateFrameName, 2075 int /* frame_id */, 2076 bool /* is_top_level */, 2077 std::string /* name */) 2078 2079 2080IPC_STRUCT_BEGIN(ViewHostMsg_CompositorSurfaceBuffersSwapped_Params) 2081 IPC_STRUCT_MEMBER(int32, surface_id) 2082 IPC_STRUCT_MEMBER(uint64, surface_handle) 2083 IPC_STRUCT_MEMBER(int32, route_id) 2084 IPC_STRUCT_MEMBER(gfx::Size, size) 2085 IPC_STRUCT_MEMBER(float, scale_factor) 2086 IPC_STRUCT_MEMBER(int32, gpu_process_host_id) 2087 IPC_STRUCT_MEMBER(ui::LatencyInfo, latency_info) 2088IPC_STRUCT_END() 2089 2090// This message is synthesized by GpuProcessHost to pass through a swap message 2091// to the RenderWidgetHelper. This allows GetBackingStore to block for either a 2092// software or GPU frame. 2093IPC_MESSAGE_ROUTED1( 2094 ViewHostMsg_CompositorSurfaceBuffersSwapped, 2095 ViewHostMsg_CompositorSurfaceBuffersSwapped_Params /* params */) 2096 2097IPC_MESSAGE_ROUTED2(ViewHostMsg_SwapCompositorFrame, 2098 uint32 /* output_surface_id */, 2099 cc::CompositorFrame /* frame */) 2100 2101// Sent by the compositor when input scroll events are dropped due to bounds 2102// restricions on the root scroll offset. 2103IPC_MESSAGE_ROUTED2(ViewHostMsg_DidOverscroll, 2104 gfx::Vector2dF /* accumulated_overscroll */, 2105 gfx::Vector2dF /* current_fling_velocity */) 2106 2107// Reply to a snapshot request containing whether snapshotting succeeded and the 2108// SkBitmap if it succeeded. 2109IPC_MESSAGE_ROUTED2(ViewHostMsg_Snapshot, 2110 bool, /* success */ 2111 SkBitmap /* bitmap */) 2112 2113//--------------------------------------------------------------------------- 2114// Request for cryptographic operation messages: 2115// These are messages from the renderer to the browser to perform a 2116// cryptographic operation. 2117 2118// Asks the browser process to generate a keypair for grabbing a client 2119// certificate from a CA (<keygen> tag), and returns the signed public 2120// key and challenge string. 2121IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen, 2122 uint32 /* key size index */, 2123 std::string /* challenge string */, 2124 GURL /* URL of requestor */, 2125 std::string /* signed public key and challenge */) 2126 2127// Message sent from the renderer to the browser to request that the browser 2128// cache |data| associated with |url|. 2129IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata, 2130 GURL /* url */, 2131 double /* expected_response_time */, 2132 std::vector<char> /* data */) 2133 2134// Displays a JavaScript out-of-memory message in the infobar. 2135IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory) 2136 2137// Register a new handler for URL requests with the given scheme. 2138IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler, 2139 std::string /* scheme */, 2140 GURL /* url */, 2141 string16 /* title */, 2142 bool /* user_gesture */) 2143 2144// Stores new inspector setting in the profile. 2145// TODO(jam): this should be in the chrome module 2146IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting, 2147 std::string, /* key */ 2148 std::string /* value */) 2149 2150// Puts the browser into "tab fullscreen" mode for the sending renderer. 2151// See the comment in chrome/browser/ui/browser.h for more details. 2152IPC_MESSAGE_ROUTED1(ViewHostMsg_ToggleFullscreen, 2153 bool /* enter_fullscreen */) 2154 2155// Send back a string to be recorded by UserMetrics. 2156IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction, 2157 std::string /* action */) 2158 2159// Notifies the browser that the page was or was not saved as MHTML. 2160IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML, 2161 int /* job_id */, 2162 int64 /* size of the MHTML file, -1 if error */) 2163 2164IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks, 2165 std::vector<GURL> /* all savable resource links */, 2166 std::vector<content::Referrer> /* all referrers */, 2167 std::vector<GURL> /* all frame links */) 2168 2169IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData, 2170 GURL /* frame's url */, 2171 std::string /* data buffer */, 2172 int32 /* complete status */) 2173 2174// Notifies the browser of an event occurring in the media pipeline. 2175IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvents, 2176 std::vector<media::MediaLogEvent> /* events */) 2177 2178// Requests to lock the mouse. Will result in a ViewMsg_LockMouse_ACK message 2179// being sent back. 2180// |privileged| is used by Pepper Flash. If this flag is set to true, we won't 2181// pop up a bubble to ask for user permission or take mouse lock content into 2182// account. 2183IPC_MESSAGE_ROUTED3(ViewHostMsg_LockMouse, 2184 bool /* user_gesture */, 2185 bool /* last_unlocked_by_target */, 2186 bool /* privileged */) 2187 2188// Requests to unlock the mouse. A ViewMsg_MouseLockLost message will be sent 2189// whenever the mouse is unlocked (which may or may not be caused by 2190// ViewHostMsg_UnlockMouse). 2191IPC_MESSAGE_ROUTED0(ViewHostMsg_UnlockMouse) 2192 2193// Notifies that the initial empty document of a view has been accessed. 2194// After this, it is no longer safe to show a pending navigation's URL without 2195// making a URL spoof possible. 2196IPC_MESSAGE_ROUTED0(ViewHostMsg_DidAccessInitialDocument) 2197 2198// Following message is used to communicate the values received by the 2199// callback binding the JS to Cpp. 2200// An instance of browser that has an automation host listening to it can 2201// have a javascript send a native value (string, number, boolean) to the 2202// listener in Cpp. (DomAutomationController) 2203IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse, 2204 std::string /* json_string */, 2205 int /* automation_id */) 2206 2207// Sent to the browser when the renderer detects it is blocked on a pepper 2208// plugin message for too long. This is also sent when it becomes unhung 2209// (according to the value of is_hung). The browser can give the user the 2210// option of killing the plugin. 2211IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung, 2212 int /* plugin_child_id */, 2213 base::FilePath /* path */, 2214 bool /* is_hung */) 2215 2216// Notifies that multiple touch targets may have been pressed, and to show 2217// the disambiguation popup. 2218IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup, 2219 gfx::Rect, /* Border of touched targets */ 2220 gfx::Size, /* Size of zoomed image */ 2221 TransportDIB::Id /* DIB of zoomed image */) 2222 2223// Sent by the renderer process to check whether client 3D APIs 2224// (Pepper 3D, WebGL) are explicitly blocked. 2225IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Are3DAPIsBlocked, 2226 int /* render_view_id */, 2227 GURL /* top_origin_url */, 2228 content::ThreeDAPIType /* requester */, 2229 bool /* blocked */) 2230 2231// Sent by the renderer process to indicate that a context was lost by 2232// client 3D content (Pepper 3D, WebGL) running on the page at the 2233// given URL. 2234IPC_MESSAGE_CONTROL3(ViewHostMsg_DidLose3DContext, 2235 GURL /* top_origin_url */, 2236 content::ThreeDAPIType /* context_type */, 2237 int /* arb_robustness_status_code */) 2238 2239// This message is sent when a frame is added to the DOM. 2240IPC_MESSAGE_ROUTED3(ViewHostMsg_FrameAttached, 2241 int64 /* parent_frame_id*/, 2242 int64 /* frame_id */, 2243 std::string /* frame_name */) 2244 2245// Notifies the browser that the frame with the given id was detached. The 2246// |parent_frame_id| is -1 for the top level frame, otherwise the id of the 2247// immediate parent of the detached frame. 2248IPC_MESSAGE_ROUTED2(ViewHostMsg_FrameDetached, 2249 int64 /* parent_frame_id */, 2250 int64 /* frame_id */) 2251 2252// Notifies the browser that document has parsed the body. This is used by the 2253// ResourceScheduler as an indication that bandwidth contention won't block 2254// first paint. 2255IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody) 2256 2257// Notification that the urls for the favicon of a site has been determined. 2258IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL, 2259 int32 /* page_id */, 2260 std::vector<content::FaviconURL> /* candidates */) 2261 2262// Sent once a paint happens after the first non empty layout. In other words 2263// after the page has painted something. 2264IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFirstVisuallyNonEmptyPaint, 2265 int /* page_id */) 2266 2267#if defined(OS_ANDROID) 2268// Response to ViewMsg_FindMatchRects. 2269// 2270// |version| will contain the current version number of the renderer's find 2271// match list (incremented whenever they change), which should be passed in the 2272// next call to ViewMsg_FindMatchRects. 2273// 2274// |rects| will either contain a list of the enclosing rects of all matches 2275// found by the most recent Find operation, or will be empty if |version| is not 2276// greater than the |current_version| passed to ViewMsg_FindMatchRects (hence 2277// your locally cached rects should still be valid). The rect coords will be 2278// custom normalized fractions of the document size. The rects will be sorted by 2279// frame traversal order starting in the main frame, then by dom order. 2280// 2281// |active_rect| will contain the bounding box of the active find-in-page match 2282// marker, in similarly normalized coords (or an empty rect if there isn't one). 2283IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, 2284 int /* version */, 2285 std::vector<gfx::RectF> /* rects */, 2286 gfx::RectF /* active_rect */) 2287 2288// Start an android intent with the given URI. 2289IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent, 2290 GURL /* content_url */) 2291 2292// Message sent when the renderer changed the background color for the view. 2293IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeBodyBackgroundColor, 2294 uint32 /* bg_color */) 2295 2296// This message is an ACK that the batch state change has been received by 2297// the renderer and all IME related messages should be processed accordingly. 2298IPC_MESSAGE_ROUTED1(ViewHostMsg_ImeBatchStateChanged_ACK, 2299 bool /* is_begin */) 2300 2301// This message runs the MediaCodec for decoding audio for webaudio. 2302IPC_MESSAGE_CONTROL3(ViewHostMsg_RunWebAudioMediaCodec, 2303 base::SharedMemoryHandle /* encoded_data_handle */, 2304 base::FileDescriptor /* pcm_output */, 2305 uint32_t /* data_size*/) 2306 2307// Sent by renderer to request a ViewMsg_BeginFrame message for upcoming 2308// display events. If |enabled| is true, the BeginFrame message will continue 2309// to be be delivered until the notification is disabled. 2310IPC_MESSAGE_ROUTED1(ViewHostMsg_SetNeedsBeginFrame, 2311 bool /* enabled */) 2312 2313// Sent by the renderer to the browser to start a vibration with the given 2314// duration. 2315IPC_MESSAGE_CONTROL1(ViewHostMsg_Vibrate, 2316 int64 /* milliseconds */) 2317 2318// Sent by the renderer to the browser to cancel the currently running 2319// vibration, if there is one. 2320IPC_MESSAGE_CONTROL0(ViewHostMsg_CancelVibration) 2321 2322#elif defined(OS_MACOSX) 2323// Request that the browser load a font into shared memory for us. 2324IPC_SYNC_MESSAGE_CONTROL1_3(ViewHostMsg_LoadFont, 2325 FontDescriptor /* font to load */, 2326 uint32 /* buffer size */, 2327 base::SharedMemoryHandle /* font data */, 2328 uint32 /* font id */) 2329 2330// Informs the browser that a plugin has gained or lost focus. 2331IPC_MESSAGE_ROUTED2(ViewHostMsg_PluginFocusChanged, 2332 bool, /* focused */ 2333 int /* plugin_id */) 2334 2335// Instructs the browser to start plugin IME. 2336IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) 2337 2338#elif defined(OS_WIN) 2339// Request that the given font characters be loaded by the browser so it's 2340// cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters 2341// for details. 2342IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, 2343 LOGFONT /* font_data */, 2344 string16 /* characters */) 2345#endif 2346 2347#if defined(OS_POSIX) 2348// On POSIX, we cannot allocated shared memory from within the sandbox, so 2349// this call exists for the renderer to ask the browser to allocate memory 2350// on its behalf. We return a file descriptor to the POSIX shared memory. 2351// If the |cache_in_browser| flag is |true|, then a copy of the shmem is kept 2352// by the browser, and it is the caller's repsonsibility to send a 2353// ViewHostMsg_FreeTransportDIB message in order to release the cached shmem. 2354// In all cases, the caller is responsible for deleting the resulting 2355// TransportDIB. 2356IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_AllocTransportDIB, 2357 uint32_t, /* bytes requested */ 2358 bool, /* cache in the browser */ 2359 TransportDIB::Handle /* DIB */) 2360 2361// Since the browser keeps handles to the allocated transport DIBs, this 2362// message is sent to tell the browser that it may release them when the 2363// renderer is finished with them. 2364IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, 2365 TransportDIB::Id /* DIB id */) 2366#endif 2367 2368#if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) 2369// On MACOSX, WIN and AURA IME can request composition character bounds 2370// synchronously (see crbug.com/120597). This IPC message sends the character 2371// bounds after every composition change to always have correct bound info. 2372IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged, 2373 ui::Range /* composition range */, 2374 std::vector<gfx::Rect> /* character bounds */) 2375#endif 2376 2377// Adding a new message? Stick to the sort order above: first platform 2378// independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 2379// independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 2380