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" | |
27 #include "content/common/view_message_enums.h" | 26 #include "content/common/view_message_enums.h" |
28 #include "content/public/common/common_param_traits.h" | 27 #include "content/public/common/common_param_traits.h" |
29 #include "content/public/common/favicon_url.h" | 28 #include "content/public/common/favicon_url.h" |
30 #include "content/public/common/file_chooser_file_info.h" | 29 #include "content/public/common/file_chooser_file_info.h" |
31 #include "content/public/common/file_chooser_params.h" | 30 #include "content/public/common/file_chooser_params.h" |
32 #include "content/public/common/menu_item.h" | 31 #include "content/public/common/menu_item.h" |
33 #include "content/public/common/message_port_types.h" | 32 #include "content/public/common/message_port_types.h" |
34 #include "content/public/common/page_state.h" | 33 #include "content/public/common/page_state.h" |
35 #include "content/public/common/page_zoom.h" | 34 #include "content/public/common/page_zoom.h" |
36 #include "content/public/common/referrer.h" | 35 #include "content/public/common/referrer.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 IPC_STRUCT_TRAITS_MEMBER(default_font_size) | 285 IPC_STRUCT_TRAITS_MEMBER(default_font_size) |
287 IPC_STRUCT_TRAITS_END() | 286 IPC_STRUCT_TRAITS_END() |
288 | 287 |
289 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) | 288 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) |
290 IPC_STRUCT_TRAITS_MEMBER(id) | 289 IPC_STRUCT_TRAITS_MEMBER(id) |
291 IPC_STRUCT_TRAITS_MEMBER(type) | 290 IPC_STRUCT_TRAITS_MEMBER(type) |
292 IPC_STRUCT_TRAITS_MEMBER(params) | 291 IPC_STRUCT_TRAITS_MEMBER(params) |
293 IPC_STRUCT_TRAITS_MEMBER(time) | 292 IPC_STRUCT_TRAITS_MEMBER(time) |
294 IPC_STRUCT_TRAITS_END() | 293 IPC_STRUCT_TRAITS_END() |
295 | 294 |
296 IPC_STRUCT_TRAITS_BEGIN(content::TextInputState) | |
297 IPC_STRUCT_TRAITS_MEMBER(type) | |
298 IPC_STRUCT_TRAITS_MEMBER(mode) | |
299 IPC_STRUCT_TRAITS_MEMBER(flags) | |
300 IPC_STRUCT_TRAITS_MEMBER(value) | |
301 IPC_STRUCT_TRAITS_MEMBER(selection_start) | |
302 IPC_STRUCT_TRAITS_MEMBER(selection_end) | |
303 IPC_STRUCT_TRAITS_MEMBER(composition_start) | |
304 IPC_STRUCT_TRAITS_MEMBER(composition_end) | |
305 IPC_STRUCT_TRAITS_MEMBER(can_compose_inline) | |
306 IPC_STRUCT_TRAITS_MEMBER(show_ime_if_needed) | |
307 IPC_STRUCT_TRAITS_MEMBER(is_non_ime_change) | |
308 IPC_STRUCT_TRAITS_END() | |
309 | |
310 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) | 295 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) |
311 // Routing ID of the view initiating the open. | 296 // Routing ID of the view initiating the open. |
312 IPC_STRUCT_MEMBER(int, opener_id) | 297 IPC_STRUCT_MEMBER(int, opener_id) |
313 | 298 |
314 // True if this open request came in the context of a user gesture. | 299 // True if this open request came in the context of a user gesture. |
315 IPC_STRUCT_MEMBER(bool, user_gesture) | 300 IPC_STRUCT_MEMBER(bool, user_gesture) |
316 | 301 |
317 // Type of window requested. | 302 // Type of window requested. |
318 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) | 303 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) |
319 | 304 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 IPC_STRUCT_END() | 406 IPC_STRUCT_END() |
422 | 407 |
423 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) | 408 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) |
424 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) | 409 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) |
425 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) | 410 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) |
426 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) | 411 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) |
427 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) | 412 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) |
428 IPC_STRUCT_MEMBER(bool, is_anchor_first) | 413 IPC_STRUCT_MEMBER(bool, is_anchor_first) |
429 IPC_STRUCT_END() | 414 IPC_STRUCT_END() |
430 | 415 |
| 416 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params) |
| 417 // The type of input field |
| 418 IPC_STRUCT_MEMBER(ui::TextInputType, type) |
| 419 |
| 420 // The mode of input field |
| 421 IPC_STRUCT_MEMBER(ui::TextInputMode, mode) |
| 422 |
| 423 // The flags of the input field (autocorrect, autocomplete, etc.) |
| 424 IPC_STRUCT_MEMBER(int, flags) |
| 425 |
| 426 // The value of the input field |
| 427 IPC_STRUCT_MEMBER(std::string, value) |
| 428 |
| 429 // The cursor position of the current selection start, or the caret position |
| 430 // if nothing is selected |
| 431 IPC_STRUCT_MEMBER(int, selection_start) |
| 432 |
| 433 // The cursor position of the current selection end, or the caret position |
| 434 // if nothing is selected |
| 435 IPC_STRUCT_MEMBER(int, selection_end) |
| 436 |
| 437 // The start position of the current composition, or -1 if there is none |
| 438 IPC_STRUCT_MEMBER(int, composition_start) |
| 439 |
| 440 // The end position of the current composition, or -1 if there is none |
| 441 IPC_STRUCT_MEMBER(int, composition_end) |
| 442 |
| 443 // Whether or not inline composition can be performed for the current input. |
| 444 IPC_STRUCT_MEMBER(bool, can_compose_inline) |
| 445 |
| 446 // Whether or not the IME should be shown as a result of this update. Even if |
| 447 // true, the IME will only be shown if the type is appropriate (e.g. not |
| 448 // TEXT_INPUT_TYPE_NONE). |
| 449 IPC_STRUCT_MEMBER(bool, show_ime_if_needed) |
| 450 |
| 451 // Whether this change is originated from non-IME (e.g. Javascript, Autofill). |
| 452 IPC_STRUCT_MEMBER(bool, is_non_ime_change) |
| 453 IPC_STRUCT_END() |
| 454 |
431 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) | 455 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) |
432 // The size of the RenderView when this message was generated. This is | 456 // The size of the RenderView when this message was generated. This is |
433 // included so the host knows how large the view is from the perspective of | 457 // included so the host knows how large the view is from the perspective of |
434 // the renderer process. This is necessary in case a resize operation is in | 458 // the renderer process. This is necessary in case a resize operation is in |
435 // progress. If auto-resize is enabled, this should update the corresponding | 459 // progress. If auto-resize is enabled, this should update the corresponding |
436 // view size. | 460 // view size. |
437 IPC_STRUCT_MEMBER(gfx::Size, view_size) | 461 IPC_STRUCT_MEMBER(gfx::Size, view_size) |
438 | 462 |
439 // The following describes the various bits that may be set in flags: | 463 // The following describes the various bits that may be set in flags: |
440 // | 464 // |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 // true) focusable element. | 1150 // true) focusable element. |
1127 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, | 1151 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, |
1128 bool /* reverse */) | 1152 bool /* reverse */) |
1129 | 1153 |
1130 // Required for opening a date/time dialog | 1154 // Required for opening a date/time dialog |
1131 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, | 1155 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, |
1132 ViewHostMsg_DateTimeDialogValue_Params /* value */) | 1156 ViewHostMsg_DateTimeDialogValue_Params /* value */) |
1133 | 1157 |
1134 // Required for updating text input state. | 1158 // Required for updating text input state. |
1135 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, | 1159 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, |
1136 content::TextInputState /* input state */) | 1160 ViewHostMsg_TextInputState_Params /* input state params */) |
1137 | 1161 |
1138 // Sent when the renderer changes the zoom level for a particular url, so the | 1162 // Sent when the renderer changes the zoom level for a particular url, so the |
1139 // browser can update its records. If the view is a plugin doc, then url is | 1163 // browser can update its records. If the view is a plugin doc, then url is |
1140 // used to update the zoom level for all pages in that site. Otherwise, the | 1164 // used to update the zoom level for all pages in that site. Otherwise, the |
1141 // render view's id is used so that only the menu is updated. | 1165 // render view's id is used so that only the menu is updated. |
1142 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, | 1166 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, |
1143 double /* zoom_level */, | 1167 double /* zoom_level */, |
1144 GURL /* url */) | 1168 GURL /* url */) |
1145 | 1169 |
1146 // Sent when the renderer changes its page scale factor. | 1170 // Sent when the renderer changes its page scale factor. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 int /* y */) | 1282 int /* y */) |
1259 | 1283 |
1260 #elif defined(OS_MACOSX) | 1284 #elif defined(OS_MACOSX) |
1261 // Receives content of a web page as plain text. | 1285 // Receives content of a web page as plain text. |
1262 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) | 1286 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) |
1263 #endif | 1287 #endif |
1264 | 1288 |
1265 // Adding a new message? Stick to the sort order above: first platform | 1289 // Adding a new message? Stick to the sort order above: first platform |
1266 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1290 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
1267 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1291 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
OLD | NEW |