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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
12 #include "base/process/process.h" | 12 #include "base/process/process.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "cc/ipc/cc_param_traits.h" | 15 #include "cc/ipc/cc_param_traits.h" |
16 #include "cc/output/begin_frame_args.h" | 16 #include "cc/output/begin_frame_args.h" |
17 #include "cc/output/compositor_frame.h" | 17 #include "cc/output/compositor_frame.h" |
18 #include "cc/output/compositor_frame_ack.h" | 18 #include "cc/output/compositor_frame_ack.h" |
19 #include "cc/resources/shared_bitmap.h" | 19 #include "cc/resources/shared_bitmap.h" |
20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
21 #include "content/common/content_param_traits.h" | 21 #include "content/common/content_param_traits.h" |
22 #include "content/common/date_time_suggestion.h" | 22 #include "content/common/date_time_suggestion.h" |
23 #include "content/common/frame_replication_state.h" | 23 #include "content/common/frame_replication_state.h" |
24 #include "content/common/navigation_gesture.h" | 24 #include "content/common/navigation_gesture.h" |
25 #include "content/common/resize_params.h" | 25 #include "content/common/resize_params.h" |
26 #include "content/common/text_input_state.h" | 26 #include "content/common/text_input_state.h" |
27 #include "content/common/view_message_enums.h" | 27 #include "content/common/view_message_enums.h" |
28 #include "content/public/common/common_param_traits.h" | 28 #include "content/public/common/common_param_traits.h" |
29 #include "content/public/common/favicon_url.h" | 29 #include "content/public/common/favicon_url.h" |
30 #include "content/public/common/file_chooser_file_info.h" | |
31 #include "content/public/common/file_chooser_params.h" | |
32 #include "content/public/common/menu_item.h" | 30 #include "content/public/common/menu_item.h" |
33 #include "content/public/common/page_state.h" | 31 #include "content/public/common/page_state.h" |
34 #include "content/public/common/page_zoom.h" | 32 #include "content/public/common/page_zoom.h" |
35 #include "content/public/common/referrer.h" | 33 #include "content/public/common/referrer.h" |
36 #include "content/public/common/renderer_preferences.h" | 34 #include "content/public/common/renderer_preferences.h" |
37 #include "content/public/common/three_d_api_types.h" | 35 #include "content/public/common/three_d_api_types.h" |
38 #include "content/public/common/window_container_type.h" | 36 #include "content/public/common/window_container_type.h" |
39 #include "ipc/ipc_channel_handle.h" | 37 #include "ipc/ipc_channel_handle.h" |
40 #include "ipc/ipc_message_macros.h" | 38 #include "ipc/ipc_message_macros.h" |
41 #include "media/base/audio_parameters.h" | 39 #include "media/base/audio_parameters.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 blink::WebScreenOrientationUndefined, | 88 blink::WebScreenOrientationUndefined, |
91 blink::WebScreenOrientationLandscapeSecondary) | 89 blink::WebScreenOrientationLandscapeSecondary) |
92 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebWorkerCreationError, | 90 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebWorkerCreationError, |
93 blink::WebWorkerCreationErrorLast) | 91 blink::WebWorkerCreationErrorLast) |
94 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection, | 92 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection, |
95 blink::WebTextDirection::WebTextDirectionLast) | 93 blink::WebTextDirection::WebTextDirectionLast) |
96 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDisplayMode, | 94 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDisplayMode, |
97 blink::WebDisplayMode::WebDisplayModeLast) | 95 blink::WebDisplayMode::WebDisplayModeLast) |
98 IPC_ENUM_TRAITS_MAX_VALUE(WindowContainerType, WINDOW_CONTAINER_TYPE_MAX_VALUE) | 96 IPC_ENUM_TRAITS_MAX_VALUE(WindowContainerType, WINDOW_CONTAINER_TYPE_MAX_VALUE) |
99 IPC_ENUM_TRAITS(content::FaviconURL::IconType) | 97 IPC_ENUM_TRAITS(content::FaviconURL::IconType) |
100 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) | |
101 IPC_ENUM_TRAITS(content::MenuItem::Type) | 98 IPC_ENUM_TRAITS(content::MenuItem::Type) |
102 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture, | 99 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture, |
103 content::NavigationGestureLast) | 100 content::NavigationGestureLast) |
104 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom, | 101 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom, |
105 content::PageZoom::PAGE_ZOOM_OUT, | 102 content::PageZoom::PAGE_ZOOM_OUT, |
106 content::PageZoom::PAGE_ZOOM_IN) | 103 content::PageZoom::PAGE_ZOOM_IN) |
107 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting, | 104 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting, |
108 gfx::FontRenderParams::HINTING_MAX) | 105 gfx::FontRenderParams::HINTING_MAX) |
109 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering, | 106 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering, |
110 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX) | 107 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX) |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 IPC_STRUCT_TRAITS_MEMBER(localized_value) | 203 IPC_STRUCT_TRAITS_MEMBER(localized_value) |
207 IPC_STRUCT_TRAITS_MEMBER(label) | 204 IPC_STRUCT_TRAITS_MEMBER(label) |
208 IPC_STRUCT_TRAITS_END() | 205 IPC_STRUCT_TRAITS_END() |
209 | 206 |
210 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL) | 207 IPC_STRUCT_TRAITS_BEGIN(content::FaviconURL) |
211 IPC_STRUCT_TRAITS_MEMBER(icon_url) | 208 IPC_STRUCT_TRAITS_MEMBER(icon_url) |
212 IPC_STRUCT_TRAITS_MEMBER(icon_type) | 209 IPC_STRUCT_TRAITS_MEMBER(icon_type) |
213 IPC_STRUCT_TRAITS_MEMBER(icon_sizes) | 210 IPC_STRUCT_TRAITS_MEMBER(icon_sizes) |
214 IPC_STRUCT_TRAITS_END() | 211 IPC_STRUCT_TRAITS_END() |
215 | 212 |
216 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) | |
217 IPC_STRUCT_TRAITS_MEMBER(file_path) | |
218 IPC_STRUCT_TRAITS_MEMBER(display_name) | |
219 IPC_STRUCT_TRAITS_MEMBER(file_system_url) | |
220 IPC_STRUCT_TRAITS_MEMBER(modification_time) | |
221 IPC_STRUCT_TRAITS_MEMBER(length) | |
222 IPC_STRUCT_TRAITS_MEMBER(is_directory) | |
223 IPC_STRUCT_TRAITS_END() | |
224 | |
225 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserParams) | |
226 IPC_STRUCT_TRAITS_MEMBER(mode) | |
227 IPC_STRUCT_TRAITS_MEMBER(title) | |
228 IPC_STRUCT_TRAITS_MEMBER(default_file_name) | |
229 IPC_STRUCT_TRAITS_MEMBER(accept_types) | |
230 IPC_STRUCT_TRAITS_MEMBER(need_local_path) | |
231 #if defined(OS_ANDROID) | |
232 IPC_STRUCT_TRAITS_MEMBER(capture) | |
233 #endif | |
234 IPC_STRUCT_TRAITS_MEMBER(requestor) | |
235 IPC_STRUCT_TRAITS_END() | |
236 | |
237 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) | 213 IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) |
238 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) | 214 IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops) |
239 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) | 215 IPC_STRUCT_TRAITS_MEMBER(should_antialias_text) |
240 IPC_STRUCT_TRAITS_MEMBER(hinting) | 216 IPC_STRUCT_TRAITS_MEMBER(hinting) |
241 IPC_STRUCT_TRAITS_MEMBER(use_autohinter) | 217 IPC_STRUCT_TRAITS_MEMBER(use_autohinter) |
242 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps) | 218 IPC_STRUCT_TRAITS_MEMBER(use_bitmaps) |
243 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) | 219 IPC_STRUCT_TRAITS_MEMBER(subpixel_rendering) |
244 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning) | 220 IPC_STRUCT_TRAITS_MEMBER(use_subpixel_positioning) |
245 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) | 221 IPC_STRUCT_TRAITS_MEMBER(focus_ring_color) |
246 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) | 222 IPC_STRUCT_TRAITS_MEMBER(thumb_active_color) |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 // Tell the renderer to add a property to the WebUI binding object. This | 659 // Tell the renderer to add a property to the WebUI binding object. This |
684 // only works if we allowed WebUI bindings. | 660 // only works if we allowed WebUI bindings. |
685 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty, | 661 IPC_MESSAGE_ROUTED2(ViewMsg_SetWebUIProperty, |
686 std::string /* property_name */, | 662 std::string /* property_name */, |
687 std::string /* property_value_json */) | 663 std::string /* property_value_json */) |
688 | 664 |
689 // Used to notify the render-view that we have received a target URL. Used | 665 // Used to notify the render-view that we have received a target URL. Used |
690 // to prevent target URLs spamming the browser. | 666 // to prevent target URLs spamming the browser. |
691 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK) | 667 IPC_MESSAGE_ROUTED0(ViewMsg_UpdateTargetURL_ACK) |
692 | 668 |
693 IPC_MESSAGE_ROUTED1(ViewMsg_RunFileChooserResponse, | |
694 std::vector<content::FileChooserFileInfo>) | |
695 | |
696 // Provides the results of directory enumeration. | 669 // Provides the results of directory enumeration. |
697 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse, | 670 IPC_MESSAGE_ROUTED2(ViewMsg_EnumerateDirectoryResponse, |
698 int /* request_id */, | 671 int /* request_id */, |
699 std::vector<base::FilePath> /* files_in_directory */) | 672 std::vector<base::FilePath> /* files_in_directory */) |
700 | 673 |
701 // Instructs the renderer to close the current page, including running the | 674 // Instructs the renderer to close the current page, including running the |
702 // onunload event handler. | 675 // onunload event handler. |
703 // | 676 // |
704 // Expects a ClosePage_ACK message when finished. | 677 // Expects a ClosePage_ACK message when finished. |
705 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) | 678 IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 // text in the document. | 1058 // text in the document. |
1086 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged, | 1059 IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged, |
1087 base::string16 /* text covers the selection range */, | 1060 base::string16 /* text covers the selection range */, |
1088 uint32_t /* the offset of the text in the document */, | 1061 uint32_t /* the offset of the text in the document */, |
1089 gfx::Range /* selection range in the document */) | 1062 gfx::Range /* selection range in the document */) |
1090 | 1063 |
1091 // Notification that the selection bounds have changed. | 1064 // Notification that the selection bounds have changed. |
1092 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged, | 1065 IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionBoundsChanged, |
1093 ViewHostMsg_SelectionBounds_Params) | 1066 ViewHostMsg_SelectionBounds_Params) |
1094 | 1067 |
1095 // Asks the browser to display the file chooser. The result is returned in a | |
1096 // ViewMsg_RunFileChooserResponse message. | |
1097 IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser, | |
1098 content::FileChooserParams) | |
1099 | |
1100 // Asks the browser to enumerate a directory. This is equivalent to running | 1068 // Asks the browser to enumerate a directory. This is equivalent to running |
1101 // the file chooser in directory-enumeration mode and having the user select | 1069 // the file chooser in directory-enumeration mode and having the user select |
1102 // the given directory. The result is returned in a | 1070 // the given directory. The result is returned in a |
1103 // ViewMsg_EnumerateDirectoryResponse message. | 1071 // ViewMsg_EnumerateDirectoryResponse message. |
1104 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory, | 1072 IPC_MESSAGE_ROUTED2(ViewHostMsg_EnumerateDirectory, |
1105 int /* request_id */, | 1073 int /* request_id */, |
1106 base::FilePath /* file_path */) | 1074 base::FilePath /* file_path */) |
1107 | 1075 |
1108 // Asks the browser to save a image (for <canvas> or <img>) from a data URL. | 1076 // Asks the browser to save a image (for <canvas> or <img>) from a data URL. |
1109 // Note: |data_url| is the contents of a data:URL, and that it's represented as | 1077 // Note: |data_url| is the contents of a data:URL, and that it's represented as |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 int /* y */) | 1217 int /* y */) |
1250 | 1218 |
1251 #elif defined(OS_MACOSX) | 1219 #elif defined(OS_MACOSX) |
1252 // Receives content of a web page as plain text. | 1220 // Receives content of a web page as plain text. |
1253 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) | 1221 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) |
1254 #endif | 1222 #endif |
1255 | 1223 |
1256 // Adding a new message? Stick to the sort order above: first platform | 1224 // Adding a new message? Stick to the sort order above: first platform |
1257 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1225 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
1258 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1226 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
OLD | NEW |