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