| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // IPC messages for page rendering. | 5 // IPC messages for page rendering. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "cc/output/begin_frame_args.h" | 11 #include "cc/output/begin_frame_args.h" |
| 12 #include "cc/output/compositor_frame.h" | 12 #include "cc/output/compositor_frame.h" |
| 13 #include "cc/output/compositor_frame_ack.h" | 13 #include "cc/output/compositor_frame_ack.h" |
| 14 #include "content/common/browser_rendering_stats.h" | 14 #include "content/common/browser_rendering_stats.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/common/content_param_traits.h" | 16 #include "content/common/content_param_traits.h" |
| 17 #include "content/common/cookie_data.h" | 17 #include "content/common/cookie_data.h" |
| 18 #include "content/common/navigation_gesture.h" | 18 #include "content/common/navigation_gesture.h" |
| 19 #include "content/common/pepper_renderer_instance_data.h" | 19 #include "content/common/pepper_renderer_instance_data.h" |
| 20 #include "content/common/view_message_enums.h" | 20 #include "content/common/view_message_enums.h" |
| 21 #include "content/common/webplugin_geometry.h" | 21 #include "content/common/webplugin_geometry.h" |
| 22 #include "content/port/common/input_event_ack_state.h" | 22 #include "content/port/common/input_event_ack_state.h" |
| 23 #include "content/public/common/color_suggestion.h" | 23 #include "content/public/common/color_suggestion.h" |
| 24 #include "content/public/common/common_param_traits.h" | 24 #include "content/public/common/common_param_traits.h" |
| 25 #include "content/public/common/context_menu_params.h" | |
| 26 #include "content/public/common/favicon_url.h" | 25 #include "content/public/common/favicon_url.h" |
| 27 #include "content/public/common/file_chooser_params.h" | 26 #include "content/public/common/file_chooser_params.h" |
| 28 #include "content/public/common/frame_navigate_params.h" | 27 #include "content/public/common/frame_navigate_params.h" |
| 29 #include "content/public/common/javascript_message_type.h" | 28 #include "content/public/common/javascript_message_type.h" |
| 30 #include "content/public/common/menu_item.h" | 29 #include "content/public/common/menu_item.h" |
| 31 #include "content/public/common/page_state.h" | 30 #include "content/public/common/page_state.h" |
| 32 #include "content/public/common/page_zoom.h" | 31 #include "content/public/common/page_zoom.h" |
| 33 #include "content/public/common/referrer.h" | 32 #include "content/public/common/referrer.h" |
| 34 #include "content/public/common/renderer_preferences.h" | 33 #include "content/public/common/renderer_preferences.h" |
| 35 #include "content/public/common/stop_find_action.h" | 34 #include "content/public/common/stop_find_action.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" | 67 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" |
| 69 #endif | 68 #endif |
| 70 | 69 |
| 71 #undef IPC_MESSAGE_EXPORT | 70 #undef IPC_MESSAGE_EXPORT |
| 72 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 71 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 73 | 72 |
| 74 #define IPC_MESSAGE_START ViewMsgStart | 73 #define IPC_MESSAGE_START ViewMsgStart |
| 75 | 74 |
| 76 IPC_ENUM_TRAITS(AccessibilityMode) | 75 IPC_ENUM_TRAITS(AccessibilityMode) |
| 77 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) | 76 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) |
| 78 IPC_ENUM_TRAITS(blink::WebContextMenuData::MediaType) | |
| 79 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type) | 77 IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type) |
| 80 IPC_ENUM_TRAITS(blink::WebPluginAction::Type) | 78 IPC_ENUM_TRAITS(blink::WebPluginAction::Type) |
| 81 IPC_ENUM_TRAITS(blink::WebPopupType) | 79 IPC_ENUM_TRAITS(blink::WebPopupType) |
| 82 IPC_ENUM_TRAITS(blink::WebTextDirection) | 80 IPC_ENUM_TRAITS(blink::WebTextDirection) |
| 83 IPC_ENUM_TRAITS(WindowContainerType) | 81 IPC_ENUM_TRAITS(WindowContainerType) |
| 84 IPC_ENUM_TRAITS(content::FaviconURL::IconType) | 82 IPC_ENUM_TRAITS(content::FaviconURL::IconType) |
| 85 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) | 83 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) |
| 86 IPC_ENUM_TRAITS(content::JavaScriptMessageType) | 84 IPC_ENUM_TRAITS(content::JavaScriptMessageType) |
| 87 IPC_ENUM_TRAITS(content::MenuItem::Type) | 85 IPC_ENUM_TRAITS(content::MenuItem::Type) |
| 88 IPC_ENUM_TRAITS(content::NavigationGesture) | 86 IPC_ENUM_TRAITS(content::NavigationGesture) |
| 89 IPC_ENUM_TRAITS(content::PageZoom) | 87 IPC_ENUM_TRAITS(content::PageZoom) |
| 90 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) | 88 IPC_ENUM_TRAITS(content::RendererPreferencesHintingEnum) |
| 91 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) | 89 IPC_ENUM_TRAITS(content::RendererPreferencesSubpixelRenderingEnum) |
| 92 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy, | 90 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy, |
| 93 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX) | 91 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX) |
| 94 IPC_ENUM_TRAITS(content::StopFindAction) | 92 IPC_ENUM_TRAITS(content::StopFindAction) |
| 95 IPC_ENUM_TRAITS(content::ThreeDAPIType) | 93 IPC_ENUM_TRAITS(content::ThreeDAPIType) |
| 96 IPC_ENUM_TRAITS(media::ChannelLayout) | 94 IPC_ENUM_TRAITS(media::ChannelLayout) |
| 97 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) | 95 IPC_ENUM_TRAITS(media::MediaLogEvent::Type) |
| 98 IPC_ENUM_TRAITS(ui::MenuSourceType) | |
| 99 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX) | 96 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX) |
| 100 IPC_ENUM_TRAITS(ui::TextInputType) | 97 IPC_ENUM_TRAITS(ui::TextInputType) |
| 101 | 98 |
| 102 #if defined(OS_MACOSX) | 99 #if defined(OS_MACOSX) |
| 103 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) | 100 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) |
| 104 IPC_STRUCT_TRAITS_MEMBER(font_name) | 101 IPC_STRUCT_TRAITS_MEMBER(font_name) |
| 105 IPC_STRUCT_TRAITS_MEMBER(font_point_size) | 102 IPC_STRUCT_TRAITS_MEMBER(font_point_size) |
| 106 IPC_STRUCT_TRAITS_END() | 103 IPC_STRUCT_TRAITS_END() |
| 107 #endif | 104 #endif |
| 108 | 105 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 IPC_STRUCT_TRAITS_MEMBER(color) | 163 IPC_STRUCT_TRAITS_MEMBER(color) |
| 167 IPC_STRUCT_TRAITS_MEMBER(label) | 164 IPC_STRUCT_TRAITS_MEMBER(label) |
| 168 IPC_STRUCT_TRAITS_END() | 165 IPC_STRUCT_TRAITS_END() |
| 169 | 166 |
| 170 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion) | 167 IPC_STRUCT_TRAITS_BEGIN(content::DateTimeSuggestion) |
| 171 IPC_STRUCT_TRAITS_MEMBER(value) | 168 IPC_STRUCT_TRAITS_MEMBER(value) |
| 172 IPC_STRUCT_TRAITS_MEMBER(localized_value) | 169 IPC_STRUCT_TRAITS_MEMBER(localized_value) |
| 173 IPC_STRUCT_TRAITS_MEMBER(label) | 170 IPC_STRUCT_TRAITS_MEMBER(label) |
| 174 IPC_STRUCT_TRAITS_END() | 171 IPC_STRUCT_TRAITS_END() |
| 175 | 172 |
| 176 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) | |
| 177 IPC_STRUCT_TRAITS_MEMBER(media_type) | |
| 178 IPC_STRUCT_TRAITS_MEMBER(x) | |
| 179 IPC_STRUCT_TRAITS_MEMBER(y) | |
| 180 IPC_STRUCT_TRAITS_MEMBER(link_url) | |
| 181 IPC_STRUCT_TRAITS_MEMBER(link_text) | |
| 182 IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url) | |
| 183 IPC_STRUCT_TRAITS_MEMBER(src_url) | |
| 184 IPC_STRUCT_TRAITS_MEMBER(has_image_contents) | |
| 185 IPC_STRUCT_TRAITS_MEMBER(page_url) | |
| 186 IPC_STRUCT_TRAITS_MEMBER(keyword_url) | |
| 187 IPC_STRUCT_TRAITS_MEMBER(frame_url) | |
| 188 IPC_STRUCT_TRAITS_MEMBER(frame_page_state) | |
| 189 IPC_STRUCT_TRAITS_MEMBER(media_flags) | |
| 190 IPC_STRUCT_TRAITS_MEMBER(selection_text) | |
| 191 IPC_STRUCT_TRAITS_MEMBER(misspelled_word) | |
| 192 IPC_STRUCT_TRAITS_MEMBER(misspelling_hash) | |
| 193 IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions) | |
| 194 IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled) | |
| 195 IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled) | |
| 196 IPC_STRUCT_TRAITS_MEMBER(is_editable) | |
| 197 IPC_STRUCT_TRAITS_MEMBER(writing_direction_default) | |
| 198 IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right) | |
| 199 IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left) | |
| 200 IPC_STRUCT_TRAITS_MEMBER(edit_flags) | |
| 201 IPC_STRUCT_TRAITS_MEMBER(security_info) | |
| 202 IPC_STRUCT_TRAITS_MEMBER(frame_charset) | |
| 203 IPC_STRUCT_TRAITS_MEMBER(referrer_policy) | |
| 204 IPC_STRUCT_TRAITS_MEMBER(custom_context) | |
| 205 IPC_STRUCT_TRAITS_MEMBER(custom_items) | |
| 206 IPC_STRUCT_TRAITS_MEMBER(source_type) | |
| 207 #if defined(OS_ANDROID) | |
| 208 IPC_STRUCT_TRAITS_MEMBER(selection_start) | |
| 209 IPC_STRUCT_TRAITS_MEMBER(selection_end) | |
| 210 #endif | |
| 211 IPC_STRUCT_TRAITS_END() | |
| 212 | |
| 213 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) | |
| 214 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) | |
| 215 IPC_STRUCT_TRAITS_MEMBER(request_id) | |
| 216 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) | |
| 217 IPC_STRUCT_TRAITS_END() | |
| 218 | |
| 219 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL) | 173 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL) |
| 220 IPC_STRUCT_TRAITS_MEMBER(icon_url) | 174 IPC_STRUCT_TRAITS_MEMBER(icon_url) |
| 221 IPC_STRUCT_TRAITS_MEMBER(icon_type) | 175 IPC_STRUCT_TRAITS_MEMBER(icon_type) |
| 222 IPC_STRUCT_TRAITS_END() | 176 IPC_STRUCT_TRAITS_END() |
| 223 | 177 |
| 224 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) | 178 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) |
| 225 IPC_STRUCT_TRAITS_MEMBER(mode) | 179 IPC_STRUCT_TRAITS_MEMBER(mode) |
| 226 IPC_STRUCT_TRAITS_MEMBER(title) | 180 IPC_STRUCT_TRAITS_MEMBER(title) |
| 227 IPC_STRUCT_TRAITS_MEMBER(default_file_name) | 181 IPC_STRUCT_TRAITS_MEMBER(default_file_name) |
| 228 IPC_STRUCT_TRAITS_MEMBER(accept_types) | 182 IPC_STRUCT_TRAITS_MEMBER(accept_types) |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 // Using Echo routes the ack from browser -> GPU process -> renderer, while this | 863 // Using Echo routes the ack from browser -> GPU process -> renderer, while this |
| 910 // Ack goes directly from browser -> renderer. This is not used for the threaded | 864 // Ack goes directly from browser -> renderer. This is not used for the threaded |
| 911 // compositor path. | 865 // compositor path. |
| 912 IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK) | 866 IPC_MESSAGE_ROUTED0(ViewMsg_SwapBuffers_ACK) |
| 913 | 867 |
| 914 // Tells the renderer to focus the first (last if reverse is true) focusable | 868 // Tells the renderer to focus the first (last if reverse is true) focusable |
| 915 // node. | 869 // node. |
| 916 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, | 870 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, |
| 917 bool /* reverse */) | 871 bool /* reverse */) |
| 918 | 872 |
| 919 // Executes custom context menu action that was provided from WebKit. | |
| 920 IPC_MESSAGE_ROUTED2(ViewMsg_CustomContextMenuAction, | |
| 921 content::CustomContextMenuContext /* custom_context */, | |
| 922 unsigned /* action */) | |
| 923 | |
| 924 // Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that | |
| 925 // the menu has been closed. | |
| 926 IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed, | |
| 927 content::CustomContextMenuContext /* custom_context */) | |
| 928 | |
| 929 // Sent to inform the renderer to invoke a context menu. | 873 // Sent to inform the renderer to invoke a context menu. |
| 930 // The parameter specifies the location in the render view's coordinates. | 874 // The parameter specifies the location in the render view's coordinates. |
| 931 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu, | 875 IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu, |
| 932 gfx::Point /* location where menu should be shown */) | 876 gfx::Point /* location where menu should be shown */) |
| 933 | 877 |
| 934 // Tells the renderer to perform the specified navigation, interrupting any | 878 // Tells the renderer to perform the specified navigation, interrupting any |
| 935 // existing navigation. | 879 // existing navigation. |
| 936 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params) | 880 IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params) |
| 937 | 881 |
| 938 IPC_MESSAGE_ROUTED0(ViewMsg_Stop) | 882 IPC_MESSAGE_ROUTED0(ViewMsg_Stop) |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 // the browser may ignore this message. | 1427 // the browser may ignore this message. |
| 1484 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, | 1428 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, |
| 1485 gfx::Rect /* position */) | 1429 gfx::Rect /* position */) |
| 1486 | 1430 |
| 1487 // Notifies the browser that a frame in the view has changed. This message | 1431 // Notifies the browser that a frame in the view has changed. This message |
| 1488 // has a lot of parameters and is packed/unpacked by functions defined in | 1432 // has a lot of parameters and is packed/unpacked by functions defined in |
| 1489 // render_messages.h. | 1433 // render_messages.h. |
| 1490 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate, | 1434 IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate, |
| 1491 ViewHostMsg_FrameNavigate_Params) | 1435 ViewHostMsg_FrameNavigate_Params) |
| 1492 | 1436 |
| 1493 // Used to tell the parent that the user right clicked on an area of the | |
| 1494 // content area, and a context menu should be shown for it. The params | |
| 1495 // object contains information about the node(s) that were selected when the | |
| 1496 // user right clicked. | |
| 1497 IPC_MESSAGE_ROUTED1(ViewHostMsg_ContextMenu, content::ContextMenuParams) | |
| 1498 | |
| 1499 // Message to show a popup menu using native cocoa controls (Mac only). | 1437 // Message to show a popup menu using native cocoa controls (Mac only). |
| 1500 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup, | 1438 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup, |
| 1501 ViewHostMsg_ShowPopup_Params) | 1439 ViewHostMsg_ShowPopup_Params) |
| 1502 | 1440 |
| 1503 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied | 1441 // Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied |
| 1504 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the | 1442 // to ViewMsg_ScriptEvalRequest. The result has the value returned by the |
| 1505 // script as its only element, one of Null, Boolean, Integer, Real, Date, or | 1443 // script as its only element, one of Null, Boolean, Integer, Real, Date, or |
| 1506 // String. | 1444 // String. |
| 1507 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse, | 1445 IPC_MESSAGE_ROUTED2(ViewHostMsg_ScriptEvalResponse, |
| 1508 int /* id */, | 1446 int /* id */, |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2333 // synchronously (see crbug.com/120597). This IPC message sends the character | 2271 // synchronously (see crbug.com/120597). This IPC message sends the character |
| 2334 // bounds after every composition change to always have correct bound info. | 2272 // bounds after every composition change to always have correct bound info. |
| 2335 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged, | 2273 IPC_MESSAGE_ROUTED2(ViewHostMsg_ImeCompositionRangeChanged, |
| 2336 gfx::Range /* composition range */, | 2274 gfx::Range /* composition range */, |
| 2337 std::vector<gfx::Rect> /* character bounds */) | 2275 std::vector<gfx::Rect> /* character bounds */) |
| 2338 #endif | 2276 #endif |
| 2339 | 2277 |
| 2340 // Adding a new message? Stick to the sort order above: first platform | 2278 // Adding a new message? Stick to the sort order above: first platform |
| 2341 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 2279 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
| 2342 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 2280 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
| OLD | NEW |