// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // IPC messages for page rendering. // Multiply-included message file, hence no include guard. #include "base/process.h" #include "base/shared_memory.h" #include "content/common/common_param_traits.h" #include "content/common/css_colors.h" #include "content/common/edit_command.h" #include "content/common/navigation_gesture.h" #include "content/common/page_transition_types.h" #include "content/common/page_zoom.h" #include "content/common/renderer_preferences.h" #include "content/common/webkit_param_traits.h" #include "content/common/window_container_type.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_platform_file.h" #include "net/base/host_port_pair.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" #include "ui/base/range/range.h" #include "ui/gfx/rect.h" #include "webkit/glue/context_menu.h" #include "webkit/glue/password_form.h" #include "webkit/glue/webcookie.h" #include "webkit/glue/webmenuitem.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/webaccessibility.h" #include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/npapi/webplugininfo.h" #if defined(OS_MACOSX) #include "content/common/font_descriptor_mac.h" #endif // Define enums used in this file inside an include-guard. #ifndef CONTENT_COMMON_VIEW_MESSAGES_H_ #define CONTENT_COMMON_VIEW_MESSAGES_H_ struct ViewHostMsg_AccessibilityNotification_Type { enum Value { // The node checked state has changed. NOTIFICATION_TYPE_CHECK_STATE_CHANGED, // The node tree structure has changed. NOTIFICATION_TYPE_CHILDREN_CHANGED, // The node in focus has changed. NOTIFICATION_TYPE_FOCUS_CHANGED, // The document node has loaded. NOTIFICATION_TYPE_LOAD_COMPLETE, // The node value has changed. NOTIFICATION_TYPE_VALUE_CHANGED, // The text cursor or selection changed. NOTIFICATION_TYPE_SELECTED_TEXT_CHANGED, }; }; // Values that may be OR'd together to form the 'flags' parameter of the // ViewMsg_EnablePreferredSizeChangedMode message. enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { kPreferredSizeNothing, kPreferredSizeWidth = 1 << 0, // Requesting the height currently requires a polling loop in render_view.cc. kPreferredSizeHeightThisIsSlow = 1 << 1, }; struct ViewHostMsg_RunFileChooser_Mode { public: enum Value { // Requires that the file exists before allowing the user to pick it. Open, // Like Open, but allows picking multiple files to open. OpenMultiple, // Like Open, but selects a folder. OpenFolder, // Allows picking a nonexistent file, and prompts to overwrite if the file // already exists. Save, }; }; // Values that may be OR'd together to form the 'flags' parameter of a // ViewHostMsg_UpdateRect_Params structure. struct ViewHostMsg_UpdateRect_Flags { enum { IS_RESIZE_ACK = 1 << 0, IS_RESTORE_ACK = 1 << 1, IS_REPAINT_ACK = 1 << 2, }; static bool is_resize_ack(int flags) { return (flags & IS_RESIZE_ACK) != 0; } static bool is_restore_ack(int flags) { return (flags & IS_RESTORE_ACK) != 0; } static bool is_repaint_ack(int flags) { return (flags & IS_REPAINT_ACK) != 0; } }; struct ViewMsg_Navigate_Type { public: enum Value { // Reload the page. RELOAD, // Reload the page, ignoring any cache entries. RELOAD_IGNORING_CACHE, // The navigation is the result of session restore and should honor the // page's cache policy while restoring form state. This is set to true if // restoring a tab/session from the previous session and the previous // session did not crash. If this is not set and the page was restored then // the page's cache policy is ignored and we load from the cache. RESTORE, // Navigation type not categorized by the other types. NORMAL }; }; // The user has completed a find-in-page; this type defines what actions the // renderer should take next. struct ViewMsg_StopFinding_Params { enum Action { kClearSelection, kKeepSelection, kActivateSelection }; ViewMsg_StopFinding_Params() : action(kClearSelection) {} // The action that should be taken when the find is completed. Action action; }; #endif // CONTENT_COMMON_VIEW_MESSAGES_H_ #define IPC_MESSAGE_START ViewMsgStart IPC_ENUM_TRAITS(CSSColors::CSSColorName) IPC_ENUM_TRAITS(NavigationGesture) IPC_ENUM_TRAITS(PageZoom::Function) IPC_ENUM_TRAITS(RendererPreferencesHintingEnum) IPC_ENUM_TRAITS(RendererPreferencesSubpixelRenderingEnum) IPC_ENUM_TRAITS(ViewHostMsg_AccessibilityNotification_Type::Value) IPC_ENUM_TRAITS(ViewHostMsg_RunFileChooser_Mode::Value) IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) IPC_ENUM_TRAITS(ViewMsg_StopFinding_Params::Action) IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) IPC_ENUM_TRAITS(WebKit::WebPopupType) IPC_ENUM_TRAITS(WebKit::WebTextInputType) IPC_ENUM_TRAITS(WebMenuItem::Type) IPC_ENUM_TRAITS(WindowContainerType) IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::Role) IPC_ENUM_TRAITS(webkit_glue::WebAccessibility::State) IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams) IPC_STRUCT_TRAITS_MEMBER(media_type) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(y) IPC_STRUCT_TRAITS_MEMBER(link_url) IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url) IPC_STRUCT_TRAITS_MEMBER(src_url) IPC_STRUCT_TRAITS_MEMBER(is_image_blocked) IPC_STRUCT_TRAITS_MEMBER(page_url) IPC_STRUCT_TRAITS_MEMBER(frame_url) IPC_STRUCT_TRAITS_MEMBER(frame_content_state) IPC_STRUCT_TRAITS_MEMBER(media_flags) IPC_STRUCT_TRAITS_MEMBER(selection_text) IPC_STRUCT_TRAITS_MEMBER(misspelled_word) IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions) IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled) IPC_STRUCT_TRAITS_MEMBER(is_editable) #if defined(OS_MACOSX) IPC_STRUCT_TRAITS_MEMBER(writing_direction_default) IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right) IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left) #endif // OS_MACOSX IPC_STRUCT_TRAITS_MEMBER(edit_flags) IPC_STRUCT_TRAITS_MEMBER(security_info) IPC_STRUCT_TRAITS_MEMBER(frame_charset) IPC_STRUCT_TRAITS_MEMBER(custom_context) IPC_STRUCT_TRAITS_MEMBER(custom_items) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(EditCommand) IPC_STRUCT_TRAITS_MEMBER(name) IPC_STRUCT_TRAITS_MEMBER(value) IPC_STRUCT_TRAITS_END() #if defined(OS_MACOSX) IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) IPC_STRUCT_TRAITS_MEMBER(font_name) IPC_STRUCT_TRAITS_MEMBER(font_point_size) IPC_STRUCT_TRAITS_END() #endif IPC_STRUCT_TRAITS_BEGIN(RendererPreferences) IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) IPC_STRUCT_TRAITS_MEMBER(hinting) IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) IPC_STRUCT_TRAITS_MEMBER(thumb_inactive_color) IPC_STRUCT_TRAITS_MEMBER(track_color) IPC_STRUCT_TRAITS_MEMBER(active_selection_bg_color) IPC_STRUCT_TRAITS_MEMBER(active_selection_fg_color) IPC_STRUCT_TRAITS_MEMBER(inactive_selection_bg_color) IPC_STRUCT_TRAITS_MEMBER(inactive_selection_fg_color) IPC_STRUCT_TRAITS_MEMBER(browser_handles_top_level_requests) IPC_STRUCT_TRAITS_MEMBER(caret_blink_interval) IPC_STRUCT_TRAITS_MEMBER(enable_referrers) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(ViewMsg_StopFinding_Params) IPC_STRUCT_TRAITS_MEMBER(action) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCompositionUnderline) IPC_STRUCT_TRAITS_MEMBER(startOffset) IPC_STRUCT_TRAITS_MEMBER(endOffset) IPC_STRUCT_TRAITS_MEMBER(color) IPC_STRUCT_TRAITS_MEMBER(thick) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFindOptions) IPC_STRUCT_TRAITS_MEMBER(forward) IPC_STRUCT_TRAITS_MEMBER(matchCase) IPC_STRUCT_TRAITS_MEMBER(findNext) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_MEMBER(enable) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebKit::WebRect) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(y) IPC_STRUCT_TRAITS_MEMBER(width) IPC_STRUCT_TRAITS_MEMBER(height) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo) IPC_STRUCT_TRAITS_MEMBER(depth) IPC_STRUCT_TRAITS_MEMBER(depthPerComponent) IPC_STRUCT_TRAITS_MEMBER(isMonochrome) IPC_STRUCT_TRAITS_MEMBER(rect) IPC_STRUCT_TRAITS_MEMBER(availableRect) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebPreferences) IPC_STRUCT_TRAITS_MEMBER(standard_font_family) IPC_STRUCT_TRAITS_MEMBER(fixed_font_family) IPC_STRUCT_TRAITS_MEMBER(serif_font_family) IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family) IPC_STRUCT_TRAITS_MEMBER(cursive_font_family) IPC_STRUCT_TRAITS_MEMBER(fantasy_font_family) IPC_STRUCT_TRAITS_MEMBER(default_font_size) IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size) IPC_STRUCT_TRAITS_MEMBER(minimum_font_size) IPC_STRUCT_TRAITS_MEMBER(minimum_logical_font_size) IPC_STRUCT_TRAITS_MEMBER(default_encoding) IPC_STRUCT_TRAITS_MEMBER(javascript_enabled) IPC_STRUCT_TRAITS_MEMBER(web_security_enabled) IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows_automatically) IPC_STRUCT_TRAITS_MEMBER(loads_images_automatically) IPC_STRUCT_TRAITS_MEMBER(plugins_enabled) IPC_STRUCT_TRAITS_MEMBER(dom_paste_enabled) IPC_STRUCT_TRAITS_MEMBER(developer_extras_enabled) IPC_STRUCT_TRAITS_MEMBER(inspector_settings) IPC_STRUCT_TRAITS_MEMBER(site_specific_quirks_enabled) IPC_STRUCT_TRAITS_MEMBER(shrinks_standalone_images_to_fit) IPC_STRUCT_TRAITS_MEMBER(uses_universal_detector) IPC_STRUCT_TRAITS_MEMBER(text_areas_are_resizable) IPC_STRUCT_TRAITS_MEMBER(java_enabled) IPC_STRUCT_TRAITS_MEMBER(allow_scripts_to_close_windows) IPC_STRUCT_TRAITS_MEMBER(uses_page_cache) IPC_STRUCT_TRAITS_MEMBER(remote_fonts_enabled) IPC_STRUCT_TRAITS_MEMBER(javascript_can_access_clipboard) IPC_STRUCT_TRAITS_MEMBER(xss_auditor_enabled) IPC_STRUCT_TRAITS_MEMBER(dns_prefetching_enabled) IPC_STRUCT_TRAITS_MEMBER(local_storage_enabled) IPC_STRUCT_TRAITS_MEMBER(databases_enabled) IPC_STRUCT_TRAITS_MEMBER(application_cache_enabled) IPC_STRUCT_TRAITS_MEMBER(tabs_to_links) IPC_STRUCT_TRAITS_MEMBER(hyperlink_auditing_enabled) IPC_STRUCT_TRAITS_MEMBER(user_style_sheet_enabled) IPC_STRUCT_TRAITS_MEMBER(user_style_sheet_location) IPC_STRUCT_TRAITS_MEMBER(author_and_user_styles_enabled) IPC_STRUCT_TRAITS_MEMBER(frame_flattening_enabled) IPC_STRUCT_TRAITS_MEMBER(allow_universal_access_from_file_urls) IPC_STRUCT_TRAITS_MEMBER(allow_file_access_from_file_urls) IPC_STRUCT_TRAITS_MEMBER(webaudio_enabled) IPC_STRUCT_TRAITS_MEMBER(experimental_webgl_enabled) IPC_STRUCT_TRAITS_MEMBER(gl_multisampling_enabled) IPC_STRUCT_TRAITS_MEMBER(show_composited_layer_borders) IPC_STRUCT_TRAITS_MEMBER(show_composited_layer_tree) IPC_STRUCT_TRAITS_MEMBER(show_fps_counter) IPC_STRUCT_TRAITS_MEMBER(accelerated_compositing_enabled) IPC_STRUCT_TRAITS_MEMBER(force_compositing_mode) IPC_STRUCT_TRAITS_MEMBER(composite_to_texture_enabled) IPC_STRUCT_TRAITS_MEMBER(accelerated_2d_canvas_enabled) IPC_STRUCT_TRAITS_MEMBER(accelerated_drawing_enabled) IPC_STRUCT_TRAITS_MEMBER(accelerated_plugins_enabled) IPC_STRUCT_TRAITS_MEMBER(accelerated_layers_enabled) IPC_STRUCT_TRAITS_MEMBER(accelerated_video_enabled) IPC_STRUCT_TRAITS_MEMBER(memory_info_enabled) IPC_STRUCT_TRAITS_MEMBER(interactive_form_validation_enabled) IPC_STRUCT_TRAITS_MEMBER(fullscreen_enabled) IPC_STRUCT_TRAITS_MEMBER(allow_displaying_insecure_content) IPC_STRUCT_TRAITS_MEMBER(allow_running_insecure_content) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebMenuItem) IPC_STRUCT_TRAITS_MEMBER(label) IPC_STRUCT_TRAITS_MEMBER(toolTip) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_MEMBER(action) IPC_STRUCT_TRAITS_MEMBER(rtl) IPC_STRUCT_TRAITS_MEMBER(has_directional_override) IPC_STRUCT_TRAITS_MEMBER(enabled) IPC_STRUCT_TRAITS_MEMBER(checked) IPC_STRUCT_TRAITS_MEMBER(submenu) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(webkit_glue::CustomContextMenuContext) IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) IPC_STRUCT_TRAITS_MEMBER(request_id) IPC_STRUCT_TRAITS_MEMBER(render_widget_id) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebAccessibility) IPC_STRUCT_TRAITS_MEMBER(id) IPC_STRUCT_TRAITS_MEMBER(name) IPC_STRUCT_TRAITS_MEMBER(value) IPC_STRUCT_TRAITS_MEMBER(role) IPC_STRUCT_TRAITS_MEMBER(state) IPC_STRUCT_TRAITS_MEMBER(location) IPC_STRUCT_TRAITS_MEMBER(attributes) IPC_STRUCT_TRAITS_MEMBER(children) IPC_STRUCT_TRAITS_MEMBER(indirect_child_ids) IPC_STRUCT_TRAITS_MEMBER(html_attributes) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebCookie) IPC_STRUCT_TRAITS_MEMBER(name) IPC_STRUCT_TRAITS_MEMBER(value) IPC_STRUCT_TRAITS_MEMBER(domain) IPC_STRUCT_TRAITS_MEMBER(path) IPC_STRUCT_TRAITS_MEMBER(expires) IPC_STRUCT_TRAITS_MEMBER(http_only) IPC_STRUCT_TRAITS_MEMBER(secure) IPC_STRUCT_TRAITS_MEMBER(session) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginGeometry) IPC_STRUCT_TRAITS_MEMBER(window) IPC_STRUCT_TRAITS_MEMBER(window_rect) IPC_STRUCT_TRAITS_MEMBER(clip_rect) IPC_STRUCT_TRAITS_MEMBER(cutout_rects) IPC_STRUCT_TRAITS_MEMBER(rects_valid) IPC_STRUCT_TRAITS_MEMBER(visible) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginMimeType) IPC_STRUCT_TRAITS_MEMBER(mime_type) IPC_STRUCT_TRAITS_MEMBER(file_extensions) IPC_STRUCT_TRAITS_MEMBER(description) IPC_STRUCT_TRAITS_MEMBER(additional_param_names) IPC_STRUCT_TRAITS_MEMBER(additional_param_values) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginInfo) IPC_STRUCT_TRAITS_MEMBER(name) IPC_STRUCT_TRAITS_MEMBER(path) IPC_STRUCT_TRAITS_MEMBER(version) IPC_STRUCT_TRAITS_MEMBER(desc) IPC_STRUCT_TRAITS_MEMBER(mime_types) IPC_STRUCT_TRAITS_MEMBER(enabled) IPC_STRUCT_TRAITS_END() IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) // Routing ID of the view initiating the open. IPC_STRUCT_MEMBER(int, opener_id) // True if this open request came in the context of a user gesture. IPC_STRUCT_MEMBER(bool, user_gesture) // Type of window requested. IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) // The session storage namespace ID this view should use. IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) // The name of the resulting frame that should be created (empty if none // has been specified). IPC_STRUCT_MEMBER(string16, frame_name) // The frame identifier of the frame initiating the open. IPC_STRUCT_MEMBER(int64, opener_frame_id) // The URL of the frame initiating the open. IPC_STRUCT_MEMBER(GURL, opener_url) // The security origin of the frame initiating the open. IPC_STRUCT_MEMBER(std::string, opener_security_origin) // The URL that will be loaded in the new window (empty if none has been // sepcified). IPC_STRUCT_MEMBER(GURL, target_url) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params) // URL for the worker script. IPC_STRUCT_MEMBER(GURL, url) // True if this is a SharedWorker, false if it is a dedicated Worker. IPC_STRUCT_MEMBER(bool, is_shared) // Name for a SharedWorker, otherwise empty string. IPC_STRUCT_MEMBER(string16, name) // The ID of the parent document (unique within parent renderer). IPC_STRUCT_MEMBER(unsigned long long, document_id) // RenderView routing id used to send messages back to the parent. IPC_STRUCT_MEMBER(int, render_view_route_id) // The route ID to associate with the worker. If MSG_ROUTING_NONE is passed, // a new unique ID is created and assigned to the worker. IPC_STRUCT_MEMBER(int, route_id) // The ID of the parent's appcache host, only valid for dedicated workers. IPC_STRUCT_MEMBER(int, parent_appcache_host_id) // The ID of the appcache the main shared worker script resource was loaded // from, only valid for shared workers. IPC_STRUCT_MEMBER(int64, script_resource_appcache_id) IPC_STRUCT_END() // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data // parameters to be reasonably put in a predefined IPC message. IPC_STRUCT_BEGIN(ViewHostMsg_FrameNavigate_Params) // Page ID of this navigation. The renderer creates a new unique page ID // anytime a new session history entry is created. This means you'll get new // page IDs for user actions, and the old page IDs will be reloaded when // iframes are loaded automatically. IPC_STRUCT_MEMBER(int32, page_id) // The frame ID for this navigation. The frame ID uniquely identifies the // frame the navigation happened in for a given renderer. IPC_STRUCT_MEMBER(int64, frame_id) // URL of the page being loaded. IPC_STRUCT_MEMBER(GURL, url) // URL of the referrer of this load. WebKit generates this based on the // source of the event that caused the load. IPC_STRUCT_MEMBER(GURL, referrer) // The type of transition. IPC_STRUCT_MEMBER(PageTransition::Type, transition) // Lists the redirects that occurred on the way to the current page. This // vector has the same format as reported by the WebDataSource in the glue, // with the current page being the last one in the list (so even when // there's no redirect, there will be one entry in the list. IPC_STRUCT_MEMBER(std::vector, redirects) // Set to false if we want to update the session history but not update // the browser history. E.g., on unreachable urls. IPC_STRUCT_MEMBER(bool, should_update_history) // See SearchableFormData for a description of these. IPC_STRUCT_MEMBER(GURL, searchable_form_url) IPC_STRUCT_MEMBER(std::string, searchable_form_encoding) // See password_form.h. IPC_STRUCT_MEMBER(webkit_glue::PasswordForm, password_form) // Information regarding the security of the connection (empty if the // connection was not secure). IPC_STRUCT_MEMBER(std::string, security_info) // The gesture that initiated this navigation. IPC_STRUCT_MEMBER(NavigationGesture, gesture) // Contents MIME type of main frame. IPC_STRUCT_MEMBER(std::string, contents_mime_type) // True if this was a post request. IPC_STRUCT_MEMBER(bool, is_post) // Whether the frame navigation resulted in no change to the documents within // the page. For example, the navigation may have just resulted in scrolling // to a named anchor. IPC_STRUCT_MEMBER(bool, was_within_same_page) // The status code of the HTTP request. IPC_STRUCT_MEMBER(int, http_status_code) // Remote address of the socket which fetched this resource. IPC_STRUCT_MEMBER(net::HostPortPair, socket_address) // True if the connection was proxied. In this case, socket_address // will represent the address of the proxy, rather than the remote host. IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy) // Serialized history item state to store in the navigation entry. IPC_STRUCT_MEMBER(std::string, content_state) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_AccessibilityNotification_Params) // Type of notification. IPC_STRUCT_MEMBER(ViewHostMsg_AccessibilityNotification_Type::Value, notification_type) // The accessibility node tree. IPC_STRUCT_MEMBER(webkit_glue::WebAccessibility, acc_obj) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_RunFileChooser_Params) IPC_STRUCT_MEMBER(ViewHostMsg_RunFileChooser_Mode::Value, mode) // Title to be used for the dialog. This may be empty for the default title, // which will be either "Open" or "Save" depending on the mode. IPC_STRUCT_MEMBER(string16, title) // Default file name to select in the dialog. IPC_STRUCT_MEMBER(FilePath, default_file_name) // A comma-separated MIME types such as "audio/*,text/plain", that is used // to restrict selectable files to such types. IPC_STRUCT_MEMBER(string16, accept_types) IPC_STRUCT_END() // This message is used for supporting popup menus on Mac OS X using native // Cocoa controls. The renderer sends us this message which we use to populate // the popup menu. IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params) // Position on the screen. IPC_STRUCT_MEMBER(gfx::Rect, bounds) // The height of each item in the menu. IPC_STRUCT_MEMBER(int, item_height) // The size of the font to use for those items. IPC_STRUCT_MEMBER(double, item_font_size) // The currently selected (displayed) item in the menu. IPC_STRUCT_MEMBER(int, selected_item) // The entire list of items in the popup menu. IPC_STRUCT_MEMBER(std::vector, popup_items) // Whether items should be right-aligned. IPC_STRUCT_MEMBER(bool, right_aligned) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) // The bitmap to be painted into the view at the locations specified by // update_rects. IPC_STRUCT_MEMBER(TransportDIB::Id, bitmap) // The position and size of the bitmap. IPC_STRUCT_MEMBER(gfx::Rect, bitmap_rect) // The scroll offset. Only one of these can be non-zero, and if they are // both zero, then it means there is no scrolling and the scroll_rect is // ignored. IPC_STRUCT_MEMBER(int, dx) IPC_STRUCT_MEMBER(int, dy) // The rectangular region to scroll. IPC_STRUCT_MEMBER(gfx::Rect, scroll_rect) // The scroll offset of the render view. IPC_STRUCT_MEMBER(gfx::Point, scroll_offset) // The regions of the bitmap (in view coords) that contain updated pixels. // In the case of scrolling, this includes the scroll damage rect. IPC_STRUCT_MEMBER(std::vector, copy_rects) // The size of the RenderView when this message was generated. This is // included so the host knows how large the view is from the perspective of // the renderer process. This is necessary in case a resize operation is in // progress. IPC_STRUCT_MEMBER(gfx::Size, view_size) // The area of the RenderView reserved for resize corner when this message // was generated. Reported for the same reason as view_size is. IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect) // New window locations for plugin child windows. IPC_STRUCT_MEMBER(std::vector, plugin_window_moves) // The following describes the various bits that may be set in flags: // // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK // Indicates that this is a response to a ViewMsg_Resize message. // // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK // Indicates that this is a response to a ViewMsg_WasRestored message. // // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK // Indicates that this is a response to a ViewMsg_Repaint message. // // If flags is zero, then this message corresponds to an unsoliticed paint // request by the render view. Any of the above bits may be set in flags, // which would indicate that this paint message is an ACK for multiple // request messages. IPC_STRUCT_MEMBER(int, flags) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewMsg_SwapOut_Params) // The identifier of the RenderProcessHost for the currently closing view. // // These first two parameters are technically redundant since they are // needed only when processing the ACK message, and the processor // theoretically knows both the process and route ID. However, this is // difficult to figure out with our current implementation, so this // information is duplicated here. IPC_STRUCT_MEMBER(int, closing_process_id) // The route identifier for the currently closing RenderView. IPC_STRUCT_MEMBER(int, closing_route_id) // The identifier of the RenderProcessHost for the new view attempting to // replace the closing one above. IPC_STRUCT_MEMBER(int, new_render_process_host_id) // The identifier of the *request* the new view made that is causing the // cross-site transition. This is *not* a route_id, but the request that we // will resume once the ACK from the closing view has been received. IPC_STRUCT_MEMBER(int, new_request_id) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params) // The page_id for this navigation, or -1 if it is a new navigation. Back, // Forward, and Reload navigations should have a valid page_id. If the load // succeeds, then this page_id will be reflected in the resultant // ViewHostMsg_FrameNavigate message. IPC_STRUCT_MEMBER(int32, page_id) // If page_id is -1, then pending_history_list_offset will also be -1. // Otherwise, it contains the offset into the history list corresponding to // the current navigation. IPC_STRUCT_MEMBER(int, pending_history_list_offset) // Informs the RenderView of where its current page contents reside in // session history and the total size of the session history list. IPC_STRUCT_MEMBER(int, current_history_list_offset) IPC_STRUCT_MEMBER(int, current_history_list_length) // The URL to load. IPC_STRUCT_MEMBER(GURL, url) // The URL to send in the "Referer" header field. Can be empty if there is // no referrer. // TODO: consider folding this into extra_headers. IPC_STRUCT_MEMBER(GURL, referrer) // The type of transition. IPC_STRUCT_MEMBER(PageTransition::Type, transition) // Opaque history state (received by ViewHostMsg_UpdateState). IPC_STRUCT_MEMBER(std::string, state) // Type of navigation. IPC_STRUCT_MEMBER(ViewMsg_Navigate_Type::Value, navigation_type) // The time the request was created IPC_STRUCT_MEMBER(base::Time, request_time) // Extra headers (separated by \n) to send during the request. IPC_STRUCT_MEMBER(std::string, extra_headers) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewMsg_New_Params) // The parent window's id. IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window) // Surface for accelerated rendering. IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, compositing_surface) // Renderer-wide preferences. IPC_STRUCT_MEMBER(RendererPreferences, renderer_preferences) // Preferences for this view. IPC_STRUCT_MEMBER(WebPreferences, web_preferences) // The ID of the view to be created. IPC_STRUCT_MEMBER(int32, view_id) // The session storage namespace ID this view should use. IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) // The name of the frame associated with this view (or empty if none). IPC_STRUCT_MEMBER(string16, frame_name) IPC_STRUCT_END() // Messages sent from the browser to the renderer. // Used typically when recovering from a crash. The new rendering process // sets its global "next page id" counter to the given value. IPC_MESSAGE_CONTROL1(ViewMsg_SetNextPageID, int32 /* next_page_id */) // Sends System Colors corresponding to a set of CSS color keywords // down the pipe. // This message must be sent to the renderer immediately on launch // before creating any new views. // The message can also be sent during a renderer's lifetime if system colors // are updated. // TODO(jeremy): Possibly change IPC format once we have this all hooked up. IPC_MESSAGE_ROUTED1(ViewMsg_SetCSSColors, std::vector) // Asks the browser for a unique routing ID. IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GenerateRoutingID, int /* routing_id */) // Tells the renderer to create a new view. // This message is slightly different, the view it takes (via // ViewMsg_New_Params) is the view to create, the message itself is sent as a // non-view control message. IPC_MESSAGE_CONTROL1(ViewMsg_New, ViewMsg_New_Params) // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. // similar to the new command, but used when the renderer created a view // first, and we need to update it. IPC_MESSAGE_ROUTED2(ViewMsg_CreatingNew_ACK, gfx::NativeViewId /* parent_hwnd */, gfx::PluginWindowHandle /* compositing_surface */) // Sends updated preferences to the renderer. IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, RendererPreferences) // This passes a set of webkit preferences down to the renderer. IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, WebPreferences) // Tells the render view to close. IPC_MESSAGE_ROUTED0(ViewMsg_Close) // Tells the render view to change its size. A ViewHostMsg_PaintRect message // is generated in response provided new_size is not empty and not equal to // the view's current size. The generated ViewHostMsg_PaintRect message will // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that // we don't have to fetch it every time WebKit asks for it. IPC_MESSAGE_ROUTED2(ViewMsg_Resize, gfx::Size /* new_size */, gfx::Rect /* resizer_rect */) // Sent to inform the view that it was hidden. This allows it to reduce its // resource utilization. IPC_MESSAGE_ROUTED0(ViewMsg_WasHidden) // Tells the render view that it is no longer hidden (see WasHidden), and the // render view is expected to respond with a full repaint if needs_repainting // is true. In that case, the generated ViewHostMsg_PaintRect message will // have the IS_RESTORE_ACK flag set. If needs_repainting is false, then this // message does not trigger a message in response. IPC_MESSAGE_ROUTED1(ViewMsg_WasRestored, bool /* needs_repainting */) // Sent to inform the view that it was swapped out. This allows the process to // exit if no other views are using it. IPC_MESSAGE_ROUTED0(ViewMsg_WasSwappedOut) // Sent to render the view into the supplied transport DIB, resize // the web widget to match the |page_size|, scale it by the // appropriate scale to make it fit the |desired_size|, and return // it. In response to this message, the host generates a // ViewHostMsg_PaintAtSize_ACK message. Note that the DIB *must* be // the right size to receive an RGBA image at the |desired_size|. // |tag| is sent along with ViewHostMsg_PaintAtSize_ACK unmodified to // identify the PaintAtSize message the ACK belongs to. IPC_MESSAGE_ROUTED4(ViewMsg_PaintAtSize, TransportDIB::Handle /* dib_handle */, int /* tag */, gfx::Size /* page_size */, gfx::Size /* desired_size */) // Tells the render view that a ViewHostMsg_UpdateRect message was processed. // This signals the render view that it can send another UpdateRect message. IPC_MESSAGE_ROUTED0(ViewMsg_UpdateRect_ACK) // Message payload includes: // 1. A blob that should be cast to WebInputEvent // 2. An optional boolean value indicating if a RawKeyDown event is associated // to a keyboard shortcut of the browser. IPC_MESSAGE_ROUTED0(ViewMsg_HandleInputEvent) // This message notifies the renderer that the next key event is bound to one // or more pre-defined edit commands. If the next key event is not handled // by webkit, the specified edit commands shall be executed against current // focused frame. // Parameters // * edit_commands (see chrome/common/edit_command_types.h) // Contains one or more edit commands. // See third_party/WebKit/Source/WebCore/editing/EditorCommand.cpp for detailed // definition of webkit edit commands. // // This message must be sent just before sending a key event. IPC_MESSAGE_ROUTED1(ViewMsg_SetEditCommandsForNextKeyEvent, std::vector /* edit_commands */) // Message payload is the name/value of a WebCore edit command to execute. IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteEditCommand, std::string, /* name */ std::string /* value */) IPC_MESSAGE_ROUTED0(ViewMsg_MouseCaptureLost) // TODO(darin): figure out how this meshes with RestoreFocus IPC_MESSAGE_ROUTED1(ViewMsg_SetFocus, bool /* enable */) // Tells the renderer to focus the first (last if reverse is true) focusable // node. IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, bool /* reverse */) // Tells the renderer to scroll the currently focused node into view only if // the currently focused node is a Text node (textfield, text area or content // editable divs). IPC_MESSAGE_ROUTED0(ViewMsg_ScrollFocusedEditableNodeIntoView) // Executes custom context menu action that was provided from WebKit. IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction, webkit_glue::CustomContextMenuContext /* custom_context */, unsigned /* action */) // Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that // the menu has been closed. IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed, webkit_glue::CustomContextMenuContext /* custom_context */) // Tells the renderer to perform the specified navigation, interrupting any // existing navigation. IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params) IPC_MESSAGE_ROUTED0(ViewMsg_Stop) // Tells the renderer to reload the current focused frame IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame) // Sent when the user wants to search for a word on the page (find in page). IPC_MESSAGE_ROUTED3(ViewMsg_Find, int /* request_id */, string16 /* search_text */, WebKit::WebFindOptions) // This message notifies the renderer that the user has closed the FindInPage // window (and what action to take regarding the selection). IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding, ViewMsg_StopFinding_Params /* action */) // Used to notify the render-view that the browser has received a reply for // the Find operation and is interested in receiving the next one. This is // used to prevent the renderer from spamming the browser process with // results. IPC_MESSAGE_ROUTED0(ViewMsg_FindReplyACK) // These messages are typically generated from context menus and request the // renderer to apply the specified operation to the current selection. IPC_MESSAGE_ROUTED0(ViewMsg_Undo) IPC_MESSAGE_ROUTED0(ViewMsg_Redo) IPC_MESSAGE_ROUTED0(ViewMsg_Cut) IPC_MESSAGE_ROUTED0(ViewMsg_Copy) #if defined(OS_MACOSX) IPC_MESSAGE_ROUTED0(ViewMsg_CopyToFindPboard) #endif IPC_MESSAGE_ROUTED0(ViewMsg_Paste) // Replaces the selected region or a word around the cursor with the // specified string. IPC_MESSAGE_ROUTED1(ViewMsg_Replace, string16) IPC_MESSAGE_ROUTED0(ViewMsg_Delete) IPC_MESSAGE_ROUTED0(ViewMsg_SelectAll) // Copies the image at location x, y to the clipboard (if there indeed is an // image at that location). IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt, int /* x */, int /* y */) // Tells the renderer to perform the given action on the media player // located at the given point. IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt, gfx::Point, /* location */ WebKit::WebMediaPlayerAction) // Request for the renderer to evaluate an xpath to a frame and execute a // javascript: url in that frame's context. The message is completely // asynchronous and no corresponding response message is sent back. // // frame_xpath contains the modified xpath notation to identify an inner // subframe (starting from the root frame). It is a concatenation of // number of smaller xpaths delimited by '\n'. Each chunk in the string can // be evaluated to a frame in its parent-frame's context. // // Example: /html/body/iframe/\n/html/body/div/iframe/\n/frameset/frame[0] // can be broken into 3 xpaths // /html/body/iframe evaluates to an iframe within the root frame // /html/body/div/iframe evaluates to an iframe within the level-1 iframe // /frameset/frame[0] evaluates to first frame within the level-2 iframe // // jscript_url is the string containing the javascript: url to be executed // in the target frame's context. The string should start with "javascript:" // and continue with a valid JS text. // // If the fourth parameter is true the result is sent back to the renderer // using the message ViewHostMsg_ScriptEvalResponse. // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the // client can uniquely identify the request. IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest, string16, /* frame_xpath */ string16, /* jscript_url */ int, /* ID */ bool /* If true, result is sent back. */) // Request for the renderer to evaluate an xpath to a frame and insert css // into that frame's document. See ViewMsg_ScriptEvalRequest for details on // allowed xpath expressions. IPC_MESSAGE_ROUTED3(ViewMsg_CSSInsertRequest, std::wstring, /* frame_xpath */ std::string, /* css string */ std::string /* element id */) // External popup menus. IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem, int /* selected index, -1 means no selection */) // Change the zoom level for the current main frame. If the level actually // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser // telling it what url got zoomed and what its current zoom level is. IPC_MESSAGE_ROUTED1(ViewMsg_Zoom, PageZoom::Function /* function */) // Set the zoom level for the current main frame. If the level actually // changes, a ViewHostMsg_DidZoomURL message will be sent back to the browser // telling it what url got zoomed and what its current zoom level is. IPC_MESSAGE_ROUTED1(ViewMsg_SetZoomLevel, double /* zoom_level */) // Set the zoom level for a particular url that the renderer is in the // process of loading. This will be stored, to be used if the load commits // and ignored otherwise. IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForLoadingURL, GURL /* url */, double /* zoom_level */) // Set the zoom level for a particular url, so all render views // displaying this url can update their zoom levels to match. IPC_MESSAGE_CONTROL2(ViewMsg_SetZoomLevelForCurrentURL, GURL /* url */, double /* zoom_level */) // Change encoding of page in the renderer. IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding, std::string /*new encoding name*/) // Reset encoding of page in the renderer back to default. IPC_MESSAGE_ROUTED0(ViewMsg_ResetPageEncodingToDefault) // Requests the renderer to reserve a range of page ids. IPC_MESSAGE_ROUTED1(ViewMsg_ReservePageIDRange, int /* size_of_range */) // Used to tell a render view whether it should expose various bindings // that allow JS content extended privileges. See BindingsPolicy for valid // flag values. IPC_MESSAGE_ROUTED1(ViewMsg_AllowBindings, int /* enabled_bindings_flags */) // Tell the renderer to add a property to the WebUI binding object. This // only works if we allowed WebUI bindings. IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty, std::string /* property_name */, std::string /* property_value_json */) // This message starts/stop monitoring the input method status of the focused // edit control of a renderer process. // Parameters // * is_active (bool) // Indicates if an input method is active in the browser process. // The possible actions when a renderer process receives this message are // listed below: // Value Action // true Start sending IPC message ViewHostMsg_ImeUpdateTextInputState // to notify the input method status of the focused edit control. // false Stop sending IPC message ViewHostMsg_ImeUpdateTextInputState. IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive, bool /* is_active */) // This message sends a string being composed with an input method. IPC_MESSAGE_ROUTED4( ViewMsg_ImeSetComposition, string16, /* text */ std::vector, /* underlines */ int, /* selectiont_start */ int /* selection_end */) // This message confirms an ongoing composition. IPC_MESSAGE_ROUTED1(ViewMsg_ImeConfirmComposition, string16 /* text */) // Used to notify the render-view that we have received a target URL. Used // to prevent target URLs spamming the browser. IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK) // Sets the alternate error page URL (link doctor) for the renderer process. IPC_MESSAGE_ROUTED1(ViewMsg_SetAltErrorPageURL, GURL) IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse, std::vector /* selected files */) // Provides the results of directory enumeration. IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse, int /* request_id */, std::vector /* files_in_directory */) // When a renderer sends a ViewHostMsg_Focus to the browser process, // the browser has the option of sending a ViewMsg_CantFocus back to // the renderer. IPC_MESSAGE_ROUTED0(ViewMsg_CantFocus) // Instructs the renderer to invoke the frame's shouldClose method, which // runs the onbeforeunload event handler. Expects the result to be returned // via ViewHostMsg_ShouldClose. IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) // Instructs the renderer to swap out for a cross-site transition, including // running the unload event handler. See the struct above for more details. // // Expects a SwapOut_ACK message when finished, where the parameters are // echoed back. IPC_MESSAGE_ROUTED1(ViewMsg_SwapOut, ViewMsg_SwapOut_Params) // Instructs the renderer to close the current page, including running the // onunload event handler. // // Expects a ClosePage_ACK message when finished. IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) // Notifies the renderer about ui theme changes IPC_MESSAGE_ROUTED0(ViewMsg_ThemeChanged) // Notifies the renderer that a paint is to be generated for the rectangle // passed in. IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, gfx::Size /* The view size to be repainted */) // Notification that a move or resize renderer's containing window has // started. IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted) // Reply to ViewHostMsg_RequestMove, ViewHostMsg_ShowView, and // ViewHostMsg_ShowWidget to inform the renderer that the browser has // processed the move. The browser may have ignored the move, but it finished // processing. This is used because the renderer keeps a temporary cache of // the widget position while these asynchronous operations are in progress. IPC_MESSAGE_ROUTED0(ViewMsg_Move_ACK) // Used to instruct the RenderView to send back updates to the preferred size. IPC_MESSAGE_ROUTED1(ViewMsg_EnablePreferredSizeChangedMode, int /*flags*/) // Changes the text direction of the currently selected input field (if any). IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection, WebKit::WebTextDirection /* direction */) // Tells the renderer to clear the focused node (if any). IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode) // Make the RenderView transparent and render it onto a custom background. The // background will be tiled in both directions if it is not large enough. IPC_MESSAGE_ROUTED1(ViewMsg_SetBackground, SkBitmap /* background */) // Used to tell the renderer not to add scrollbars with height and // width below a threshold. IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows, gfx::Size /* disable_scrollbar_size_limit */) // Activate/deactivate the RenderView (i.e., set its controls' tint // accordingly, etc.). IPC_MESSAGE_ROUTED1(ViewMsg_SetActive, bool /* active */) #if defined(OS_MACOSX) // Let the RenderView know its window has changed visibility. IPC_MESSAGE_ROUTED1(ViewMsg_SetWindowVisibility, bool /* visibile */) // Let the RenderView know its window's frame has changed. IPC_MESSAGE_ROUTED2(ViewMsg_WindowFrameChanged, gfx::Rect /* window frame */, gfx::Rect /* content view frame */) // Message sent from the browser to the renderer when the user starts or stops // resizing the view. IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize, bool /* enable */) // Tell the renderer that plugin IME has completed. IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, string16 /* text */, int /* plugin_id */) #endif // Response message to ViewHostMsg_CreateShared/DedicatedWorker. // Sent when the worker has started. IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated) // The response to ViewHostMsg_AsyncOpenFile. IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK, base::PlatformFileError /* error_code */, IPC::PlatformFileForTransit /* file descriptor */, int /* message_id */) // Tells the renderer that the network state has changed and that // window.navigator.onLine should be updated for all WebViews. IPC_MESSAGE_ROUTED1(ViewMsg_NetworkStateChanged, bool /* online */) // Enable accessibility in the renderer process. IPC_MESSAGE_ROUTED0(ViewMsg_EnableAccessibility) // Relay a request from assistive technology to set focus to a given node. IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityFocus, int /* object id */) // Relay a request from assistive technology to perform the default action // on a given node. IPC_MESSAGE_ROUTED1(ViewMsg_AccessibilityDoDefaultAction, int /* object id */) // Tells the render view that a ViewHostMsg_AccessibilityNotifications // message was processed and it can send addition notifications. IPC_MESSAGE_ROUTED0(ViewMsg_AccessibilityNotifications_ACK) // Reply to ViewHostMsg_OpenChannelToPpapiBroker // Tells the renderer that the channel to the broker has been created. IPC_MESSAGE_ROUTED3(ViewMsg_PpapiBrokerChannelCreated, int /* request_id */, base::ProcessHandle /* broker_process_handle */, IPC::ChannelHandle /* handle */) // Tells the renderer to empty its plugin list cache, optional reloading // pages containing plugins. IPC_MESSAGE_CONTROL1(ViewMsg_PurgePluginListCache, bool /* reload_pages */) // Install the first missing pluign. IPC_MESSAGE_ROUTED0(ViewMsg_InstallMissingPlugin) // Sent to the renderer when a popup window should no longer count against // the current popup count (either because it's not a popup or because it was // a generated by a user action or because a constrained popup got turned // into a full window). IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) // Asks the renderer to send back FPS. IPC_MESSAGE_ROUTED0(ViewMsg_GetFPS) // Used to instruct the RenderView to go into "view source" mode. IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) // Messages sent from the renderer to the browser. // Sent by the renderer when it is creating a new window. The browser creates // a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is // MSG_ROUTING_NONE, the view couldn't be created. IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow, ViewHostMsg_CreateWindow_Params, int /* route_id */, int64 /* cloned_session_storage_namespace_id */) // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like // tag), and returns the signed public // key and challenge string. IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen, uint32 /* key size index */, std::string /* challenge string */, GURL /* URL of requestor */, std::string /* signed public key and challenge */) // Message sent from the renderer to the browser to request that the browser // close all sockets. Used for debugging/testing. IPC_MESSAGE_CONTROL0(ViewHostMsg_CloseCurrentConnections) // Message sent from the renderer to the browser to request that the browser // enable or disable the cache. Used for debugging/testing. IPC_MESSAGE_CONTROL1(ViewHostMsg_SetCacheMode, bool /* enabled */) // Message sent from the renderer to the browser to request that the browser // clear the cache. Used for debugging/testing. // |preserve_ssl_host_info| controls whether clearing the cache will preserve // persisted SSL information stored in the cache. // |result| is the returned status from the operation. IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_ClearCache, bool /* preserve_ssl_host_info */, int /* result */) // Message sent from the renderer to the browser to request that the browser // clear the host cache. Used for debugging/testing. // |result| is the returned status from the operation. IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_ClearHostResolverCache, int /* result */) // Message sent from the renderer to the browser to request that the browser // clear the predictor cache. Used for debugging/testing. // |result| is the returned status from the operation. IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_ClearPredictorCache, int /* result */) // Message sent from the renderer to the browser to request that the browser // enable or disable spdy. Used for debugging/testing/benchmarking. IPC_MESSAGE_CONTROL1(ViewHostMsg_EnableSpdy, bool /* enable */) // Message sent from the renderer to the browser to request that the browser // cache |data| associated with |url|. IPC_MESSAGE_CONTROL3(ViewHostMsg_DidGenerateCacheableMetadata, GURL /* url */, double /* expected_response_time */, std::vector /* data */) // Updates the content restrictions, i.e. to disable print/copy. IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions, int /* restrictions */) // The currently displayed PDF has an unsupported feature. IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature) // Brings up SaveAs... dialog to save specified URL. IPC_MESSAGE_ROUTED1(ViewHostMsg_SaveURLAs, GURL /* url */) // Notifies when default plugin updates status of the missing plugin. IPC_MESSAGE_ROUTED1(ViewHostMsg_MissingPluginStatus, int /* status */) // Displays a JavaScript out-of-memory message in the infobar. IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory) // Register a new handler for URL requests with the given scheme. IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, std::string /* scheme */, GURL /* url */, string16 /* title */) // Stores new inspector setting in the profile. // TODO(jam): this should be in the chrome module IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting, std::string, /* key */ std::string /* value */) // Send back a string to be recorded by UserMetrics. IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction, std::string /* action */) // Provide the browser process with current renderer framerate. IPC_MESSAGE_CONTROL2(ViewHostMsg_FPS, int /* routing id */, float /* frames per second */)