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/public/common/common_param_traits.h" | 28 #include "content/public/common/common_param_traits.h" |
28 #include "content/public/common/favicon_url.h" | 29 #include "content/public/common/favicon_url.h" |
29 #include "content/public/common/file_chooser_file_info.h" | 30 #include "content/public/common/file_chooser_file_info.h" |
30 #include "content/public/common/file_chooser_params.h" | 31 #include "content/public/common/file_chooser_params.h" |
31 #include "content/public/common/menu_item.h" | 32 #include "content/public/common/menu_item.h" |
32 #include "content/public/common/message_port_types.h" | 33 #include "content/public/common/message_port_types.h" |
33 #include "content/public/common/page_state.h" | 34 #include "content/public/common/page_state.h" |
34 #include "content/public/common/page_zoom.h" | 35 #include "content/public/common/page_zoom.h" |
35 #include "content/public/common/referrer.h" | 36 #include "content/public/common/referrer.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 IPC_STRUCT_TRAITS_MEMBER(default_font_size) | 286 IPC_STRUCT_TRAITS_MEMBER(default_font_size) |
286 IPC_STRUCT_TRAITS_END() | 287 IPC_STRUCT_TRAITS_END() |
287 | 288 |
288 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) | 289 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) |
289 IPC_STRUCT_TRAITS_MEMBER(id) | 290 IPC_STRUCT_TRAITS_MEMBER(id) |
290 IPC_STRUCT_TRAITS_MEMBER(type) | 291 IPC_STRUCT_TRAITS_MEMBER(type) |
291 IPC_STRUCT_TRAITS_MEMBER(params) | 292 IPC_STRUCT_TRAITS_MEMBER(params) |
292 IPC_STRUCT_TRAITS_MEMBER(time) | 293 IPC_STRUCT_TRAITS_MEMBER(time) |
293 IPC_STRUCT_TRAITS_END() | 294 IPC_STRUCT_TRAITS_END() |
294 | 295 |
| 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 |
295 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) | 310 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) |
296 // Routing ID of the view initiating the open. | 311 // Routing ID of the view initiating the open. |
297 IPC_STRUCT_MEMBER(int, opener_id) | 312 IPC_STRUCT_MEMBER(int, opener_id) |
298 | 313 |
299 // True if this open request came in the context of a user gesture. | 314 // True if this open request came in the context of a user gesture. |
300 IPC_STRUCT_MEMBER(bool, user_gesture) | 315 IPC_STRUCT_MEMBER(bool, user_gesture) |
301 | 316 |
302 // Type of window requested. | 317 // Type of window requested. |
303 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) | 318 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) |
304 | 319 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 IPC_STRUCT_END() | 421 IPC_STRUCT_END() |
407 | 422 |
408 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) | 423 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) |
409 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) | 424 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) |
410 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) | 425 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) |
411 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) | 426 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) |
412 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) | 427 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) |
413 IPC_STRUCT_MEMBER(bool, is_anchor_first) | 428 IPC_STRUCT_MEMBER(bool, is_anchor_first) |
414 IPC_STRUCT_END() | 429 IPC_STRUCT_END() |
415 | 430 |
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 | |
455 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) | 431 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) |
456 // The size of the RenderView when this message was generated. This is | 432 // The size of the RenderView when this message was generated. This is |
457 // included so the host knows how large the view is from the perspective of | 433 // included so the host knows how large the view is from the perspective of |
458 // the renderer process. This is necessary in case a resize operation is in | 434 // the renderer process. This is necessary in case a resize operation is in |
459 // progress. If auto-resize is enabled, this should update the corresponding | 435 // progress. If auto-resize is enabled, this should update the corresponding |
460 // view size. | 436 // view size. |
461 IPC_STRUCT_MEMBER(gfx::Size, view_size) | 437 IPC_STRUCT_MEMBER(gfx::Size, view_size) |
462 | 438 |
463 // The following describes the various bits that may be set in flags: | 439 // The following describes the various bits that may be set in flags: |
464 // | 440 // |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 // true) focusable element. | 1131 // true) focusable element. |
1156 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, | 1132 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, |
1157 bool /* reverse */) | 1133 bool /* reverse */) |
1158 | 1134 |
1159 // Required for opening a date/time dialog | 1135 // Required for opening a date/time dialog |
1160 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, | 1136 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, |
1161 ViewHostMsg_DateTimeDialogValue_Params /* value */) | 1137 ViewHostMsg_DateTimeDialogValue_Params /* value */) |
1162 | 1138 |
1163 // Required for updating text input state. | 1139 // Required for updating text input state. |
1164 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, | 1140 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, |
1165 ViewHostMsg_TextInputState_Params /* input state params */) | 1141 content::TextInputState /* input state */) |
1166 | 1142 |
1167 // Sent when the renderer changes the zoom level for a particular url, so the | 1143 // Sent when the renderer changes the zoom level for a particular url, so the |
1168 // browser can update its records. If the view is a plugin doc, then url is | 1144 // browser can update its records. If the view is a plugin doc, then url is |
1169 // used to update the zoom level for all pages in that site. Otherwise, the | 1145 // used to update the zoom level for all pages in that site. Otherwise, the |
1170 // render view's id is used so that only the menu is updated. | 1146 // render view's id is used so that only the menu is updated. |
1171 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, | 1147 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, |
1172 double /* zoom_level */, | 1148 double /* zoom_level */, |
1173 GURL /* url */) | 1149 GURL /* url */) |
1174 | 1150 |
1175 // Sent when the renderer changes its page scale factor. | 1151 // Sent when the renderer changes its page scale factor. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 int /* y */) | 1263 int /* y */) |
1288 | 1264 |
1289 #elif defined(OS_MACOSX) | 1265 #elif defined(OS_MACOSX) |
1290 // Receives content of a web page as plain text. | 1266 // Receives content of a web page as plain text. |
1291 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) | 1267 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) |
1292 #endif | 1268 #endif |
1293 | 1269 |
1294 // Adding a new message? Stick to the sort order above: first platform | 1270 // Adding a new message? Stick to the sort order above: first platform |
1295 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1271 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
1296 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1272 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
OLD | NEW |