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