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/output/begin_frame_args.h" | 15 #include "cc/output/begin_frame_args.h" |
16 #include "cc/output/compositor_frame.h" | 16 #include "cc/output/compositor_frame.h" |
17 #include "cc/output/compositor_frame_ack.h" | 17 #include "cc/output/compositor_frame_ack.h" |
18 #include "cc/resources/shared_bitmap.h" | 18 #include "cc/resources/shared_bitmap.h" |
19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
20 #include "content/common/content_param_traits.h" | 20 #include "content/common/content_param_traits.h" |
21 #include "content/common/date_time_suggestion.h" | 21 #include "content/common/date_time_suggestion.h" |
22 #include "content/common/frame_replication_state.h" | 22 #include "content/common/frame_replication_state.h" |
23 #include "content/common/media/media_param_traits.h" | 23 #include "content/common/media/media_param_traits.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/view_message_enums.h" | 27 #include "content/common/view_message_enums.h" |
27 #include "content/common/webplugin_geometry.h" | 28 #include "content/common/webplugin_geometry.h" |
28 #include "content/public/common/common_param_traits.h" | 29 #include "content/public/common/common_param_traits.h" |
29 #include "content/public/common/favicon_url.h" | 30 #include "content/public/common/favicon_url.h" |
30 #include "content/public/common/file_chooser_file_info.h" | 31 #include "content/public/common/file_chooser_file_info.h" |
31 #include "content/public/common/file_chooser_params.h" | 32 #include "content/public/common/file_chooser_params.h" |
32 #include "content/public/common/menu_item.h" | 33 #include "content/public/common/menu_item.h" |
33 #include "content/public/common/message_port_types.h" | 34 #include "content/public/common/message_port_types.h" |
34 #include "content/public/common/page_state.h" | 35 #include "content/public/common/page_state.h" |
35 #include "content/public/common/page_zoom.h" | 36 #include "content/public/common/page_zoom.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 IPC_STRUCT_TRAITS_MEMBER(visible) | 293 IPC_STRUCT_TRAITS_MEMBER(visible) |
293 IPC_STRUCT_TRAITS_END() | 294 IPC_STRUCT_TRAITS_END() |
294 | 295 |
295 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) | 296 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) |
296 IPC_STRUCT_TRAITS_MEMBER(id) | 297 IPC_STRUCT_TRAITS_MEMBER(id) |
297 IPC_STRUCT_TRAITS_MEMBER(type) | 298 IPC_STRUCT_TRAITS_MEMBER(type) |
298 IPC_STRUCT_TRAITS_MEMBER(params) | 299 IPC_STRUCT_TRAITS_MEMBER(params) |
299 IPC_STRUCT_TRAITS_MEMBER(time) | 300 IPC_STRUCT_TRAITS_MEMBER(time) |
300 IPC_STRUCT_TRAITS_END() | 301 IPC_STRUCT_TRAITS_END() |
301 | 302 |
| 303 IPC_STRUCT_TRAITS_BEGIN(content::TextInputState) |
| 304 IPC_STRUCT_TRAITS_MEMBER(type) |
| 305 IPC_STRUCT_TRAITS_MEMBER(mode) |
| 306 IPC_STRUCT_TRAITS_MEMBER(flags) |
| 307 IPC_STRUCT_TRAITS_MEMBER(value) |
| 308 IPC_STRUCT_TRAITS_MEMBER(selection_start) |
| 309 IPC_STRUCT_TRAITS_MEMBER(selection_end) |
| 310 IPC_STRUCT_TRAITS_MEMBER(composition_start) |
| 311 IPC_STRUCT_TRAITS_MEMBER(composition_end) |
| 312 IPC_STRUCT_TRAITS_MEMBER(can_compose_inline) |
| 313 IPC_STRUCT_TRAITS_MEMBER(show_ime_if_needed) |
| 314 IPC_STRUCT_TRAITS_MEMBER(is_non_ime_change) |
| 315 IPC_STRUCT_TRAITS_END() |
| 316 |
302 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) | 317 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) |
303 // Routing ID of the view initiating the open. | 318 // Routing ID of the view initiating the open. |
304 IPC_STRUCT_MEMBER(int, opener_id) | 319 IPC_STRUCT_MEMBER(int, opener_id) |
305 | 320 |
306 // True if this open request came in the context of a user gesture. | 321 // True if this open request came in the context of a user gesture. |
307 IPC_STRUCT_MEMBER(bool, user_gesture) | 322 IPC_STRUCT_MEMBER(bool, user_gesture) |
308 | 323 |
309 // Type of window requested. | 324 // Type of window requested. |
310 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) | 325 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) |
311 | 326 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 IPC_STRUCT_END() | 425 IPC_STRUCT_END() |
411 | 426 |
412 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) | 427 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) |
413 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) | 428 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) |
414 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) | 429 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) |
415 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) | 430 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) |
416 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) | 431 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) |
417 IPC_STRUCT_MEMBER(bool, is_anchor_first) | 432 IPC_STRUCT_MEMBER(bool, is_anchor_first) |
418 IPC_STRUCT_END() | 433 IPC_STRUCT_END() |
419 | 434 |
420 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params) | |
421 // The type of input field | |
422 IPC_STRUCT_MEMBER(ui::TextInputType, type) | |
423 | |
424 // The mode of input field | |
425 IPC_STRUCT_MEMBER(ui::TextInputMode, mode) | |
426 | |
427 // The flags of the input field (autocorrect, autocomplete, etc.) | |
428 IPC_STRUCT_MEMBER(int, flags) | |
429 | |
430 // The value of the input field | |
431 IPC_STRUCT_MEMBER(std::string, value) | |
432 | |
433 // The cursor position of the current selection start, or the caret position | |
434 // if nothing is selected | |
435 IPC_STRUCT_MEMBER(int, selection_start) | |
436 | |
437 // The cursor position of the current selection end, or the caret position | |
438 // if nothing is selected | |
439 IPC_STRUCT_MEMBER(int, selection_end) | |
440 | |
441 // The start position of the current composition, or -1 if there is none | |
442 IPC_STRUCT_MEMBER(int, composition_start) | |
443 | |
444 // The end position of the current composition, or -1 if there is none | |
445 IPC_STRUCT_MEMBER(int, composition_end) | |
446 | |
447 // Whether or not inline composition can be performed for the current input. | |
448 IPC_STRUCT_MEMBER(bool, can_compose_inline) | |
449 | |
450 // Whether or not the IME should be shown as a result of this update. Even if | |
451 // true, the IME will only be shown if the type is appropriate (e.g. not | |
452 // TEXT_INPUT_TYPE_NONE). | |
453 IPC_STRUCT_MEMBER(bool, show_ime_if_needed) | |
454 | |
455 // Whether this change is originated from non-IME (e.g. Javascript, Autofill). | |
456 IPC_STRUCT_MEMBER(bool, is_non_ime_change) | |
457 IPC_STRUCT_END() | |
458 | |
459 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) | 435 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) |
460 // The size of the RenderView when this message was generated. This is | 436 // The size of the RenderView when this message was generated. This is |
461 // included so the host knows how large the view is from the perspective of | 437 // included so the host knows how large the view is from the perspective of |
462 // the renderer process. This is necessary in case a resize operation is in | 438 // the renderer process. This is necessary in case a resize operation is in |
463 // progress. If auto-resize is enabled, this should update the corresponding | 439 // progress. If auto-resize is enabled, this should update the corresponding |
464 // view size. | 440 // view size. |
465 IPC_STRUCT_MEMBER(gfx::Size, view_size) | 441 IPC_STRUCT_MEMBER(gfx::Size, view_size) |
466 | 442 |
467 // New window locations for plugin child windows. | 443 // New window locations for plugin child windows. |
468 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>, | 444 IPC_STRUCT_MEMBER(std::vector<content::WebPluginGeometry>, |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 // true) focusable element. | 1171 // true) focusable element. |
1196 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, | 1172 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, |
1197 bool /* reverse */) | 1173 bool /* reverse */) |
1198 | 1174 |
1199 // Required for opening a date/time dialog | 1175 // Required for opening a date/time dialog |
1200 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, | 1176 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, |
1201 ViewHostMsg_DateTimeDialogValue_Params /* value */) | 1177 ViewHostMsg_DateTimeDialogValue_Params /* value */) |
1202 | 1178 |
1203 // Required for updating text input state. | 1179 // Required for updating text input state. |
1204 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, | 1180 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, |
1205 ViewHostMsg_TextInputState_Params /* input state params */) | 1181 content::TextInputState /* input state */) |
1206 | 1182 |
1207 // Sent when the renderer changes the zoom level for a particular url, so the | 1183 // Sent when the renderer changes the zoom level for a particular url, so the |
1208 // browser can update its records. If the view is a plugin doc, then url is | 1184 // browser can update its records. If the view is a plugin doc, then url is |
1209 // used to update the zoom level for all pages in that site. Otherwise, the | 1185 // used to update the zoom level for all pages in that site. Otherwise, the |
1210 // render view's id is used so that only the menu is updated. | 1186 // render view's id is used so that only the menu is updated. |
1211 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, | 1187 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, |
1212 double /* zoom_level */, | 1188 double /* zoom_level */, |
1213 GURL /* url */) | 1189 GURL /* url */) |
1214 | 1190 |
1215 // Sent when the renderer changes its page scale factor. | 1191 // Sent when the renderer changes its page scale factor. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 // Instructs the browser to start plugin IME. | 1311 // Instructs the browser to start plugin IME. |
1336 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) | 1312 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) |
1337 | 1313 |
1338 // Receives content of a web page as plain text. | 1314 // Receives content of a web page as plain text. |
1339 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) | 1315 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) |
1340 #endif | 1316 #endif |
1341 | 1317 |
1342 // Adding a new message? Stick to the sort order above: first platform | 1318 // Adding a new message? Stick to the sort order above: first platform |
1343 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1319 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
1344 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1320 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
OLD | NEW |