Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: content/common/view_messages.h

Issue 1914603002: Replace ViewHostMsg_TextInputState_Params with content::TextInputState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing creis@ comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 // true) focusable element. 1126 // true) focusable element.
1151 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, 1127 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1152 bool /* reverse */) 1128 bool /* reverse */)
1153 1129
1154 // Required for opening a date/time dialog 1130 // Required for opening a date/time dialog
1155 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, 1131 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1156 ViewHostMsg_DateTimeDialogValue_Params /* value */) 1132 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1157 1133
1158 // Required for updating text input state. 1134 // Required for updating text input state.
1159 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, 1135 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1160 ViewHostMsg_TextInputState_Params /* input state params */) 1136 content::TextInputState /* text_input_state */)
1161 1137
1162 // Sent when the renderer changes the zoom level for a particular url, so the 1138 // Sent when the renderer changes the zoom level for a particular url, so the
1163 // browser can update its records. If the view is a plugin doc, then url is 1139 // browser can update its records. If the view is a plugin doc, then url is
1164 // used to update the zoom level for all pages in that site. Otherwise, the 1140 // used to update the zoom level for all pages in that site. Otherwise, the
1165 // render view's id is used so that only the menu is updated. 1141 // render view's id is used so that only the menu is updated.
1166 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, 1142 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1167 double /* zoom_level */, 1143 double /* zoom_level */,
1168 GURL /* url */) 1144 GURL /* url */)
1169 1145
1170 // Sent when the renderer changes its page scale factor. 1146 // Sent when the renderer changes its page scale factor.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 int /* y */) 1258 int /* y */)
1283 1259
1284 #elif defined(OS_MACOSX) 1260 #elif defined(OS_MACOSX)
1285 // Receives content of a web page as plain text. 1261 // Receives content of a web page as plain text.
1286 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) 1262 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string)
1287 #endif 1263 #endif
1288 1264
1289 // Adding a new message? Stick to the sort order above: first platform 1265 // Adding a new message? Stick to the sort order above: first platform
1290 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 1266 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1291 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 1267 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698