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

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

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 IPC_STRUCT_TRAITS_MEMBER(default_font_size) 287 IPC_STRUCT_TRAITS_MEMBER(default_font_size)
287 IPC_STRUCT_TRAITS_END() 288 IPC_STRUCT_TRAITS_END()
288 289
289 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) 290 IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
290 IPC_STRUCT_TRAITS_MEMBER(id) 291 IPC_STRUCT_TRAITS_MEMBER(id)
291 IPC_STRUCT_TRAITS_MEMBER(type) 292 IPC_STRUCT_TRAITS_MEMBER(type)
292 IPC_STRUCT_TRAITS_MEMBER(params) 293 IPC_STRUCT_TRAITS_MEMBER(params)
293 IPC_STRUCT_TRAITS_MEMBER(time) 294 IPC_STRUCT_TRAITS_MEMBER(time)
294 IPC_STRUCT_TRAITS_END() 295 IPC_STRUCT_TRAITS_END()
295 296
297 IPC_STRUCT_TRAITS_BEGIN(content::TextInputState)
298 IPC_STRUCT_TRAITS_MEMBER(type)
299 IPC_STRUCT_TRAITS_MEMBER(mode)
300 IPC_STRUCT_TRAITS_MEMBER(flags)
301 IPC_STRUCT_TRAITS_MEMBER(value)
302 IPC_STRUCT_TRAITS_MEMBER(selection_start)
303 IPC_STRUCT_TRAITS_MEMBER(selection_end)
304 IPC_STRUCT_TRAITS_MEMBER(composition_start)
305 IPC_STRUCT_TRAITS_MEMBER(composition_end)
306 IPC_STRUCT_TRAITS_MEMBER(can_compose_inline)
307 IPC_STRUCT_TRAITS_MEMBER(show_ime_if_needed)
308 IPC_STRUCT_TRAITS_MEMBER(is_non_ime_change)
309 IPC_STRUCT_TRAITS_END()
310
296 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) 311 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
297 // Routing ID of the view initiating the open. 312 // Routing ID of the view initiating the open.
298 IPC_STRUCT_MEMBER(int, opener_id) 313 IPC_STRUCT_MEMBER(int, opener_id)
299 314
300 // True if this open request came in the context of a user gesture. 315 // True if this open request came in the context of a user gesture.
301 IPC_STRUCT_MEMBER(bool, user_gesture) 316 IPC_STRUCT_MEMBER(bool, user_gesture)
302 317
303 // Type of window requested. 318 // Type of window requested.
304 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) 319 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
305 320
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 IPC_STRUCT_END() 422 IPC_STRUCT_END()
408 423
409 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) 424 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params)
410 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) 425 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect)
411 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) 426 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir)
412 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) 427 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect)
413 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) 428 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir)
414 IPC_STRUCT_MEMBER(bool, is_anchor_first) 429 IPC_STRUCT_MEMBER(bool, is_anchor_first)
415 IPC_STRUCT_END() 430 IPC_STRUCT_END()
416 431
417 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params)
418 // The type of input field
419 IPC_STRUCT_MEMBER(ui::TextInputType, type)
420
421 // The mode of input field
422 IPC_STRUCT_MEMBER(ui::TextInputMode, mode)
423
424 // The flags of the input field (autocorrect, autocomplete, etc.)
425 IPC_STRUCT_MEMBER(int, flags)
426
427 // The value of the input field
428 IPC_STRUCT_MEMBER(std::string, value)
429
430 // The cursor position of the current selection start, or the caret position
431 // if nothing is selected
432 IPC_STRUCT_MEMBER(int, selection_start)
433
434 // The cursor position of the current selection end, or the caret position
435 // if nothing is selected
436 IPC_STRUCT_MEMBER(int, selection_end)
437
438 // The start position of the current composition, or -1 if there is none
439 IPC_STRUCT_MEMBER(int, composition_start)
440
441 // The end position of the current composition, or -1 if there is none
442 IPC_STRUCT_MEMBER(int, composition_end)
443
444 // Whether or not inline composition can be performed for the current input.
445 IPC_STRUCT_MEMBER(bool, can_compose_inline)
446
447 // Whether or not the IME should be shown as a result of this update. Even if
448 // true, the IME will only be shown if the type is appropriate (e.g. not
449 // TEXT_INPUT_TYPE_NONE).
450 IPC_STRUCT_MEMBER(bool, show_ime_if_needed)
451
452 // Whether this change is originated from non-IME (e.g. Javascript, Autofill).
453 IPC_STRUCT_MEMBER(bool, is_non_ime_change)
454 IPC_STRUCT_END()
455
456 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params) 432 IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
457 // The size of the RenderView when this message was generated. This is 433 // The size of the RenderView when this message was generated. This is
458 // included so the host knows how large the view is from the perspective of 434 // included so the host knows how large the view is from the perspective of
459 // the renderer process. This is necessary in case a resize operation is in 435 // the renderer process. This is necessary in case a resize operation is in
460 // progress. If auto-resize is enabled, this should update the corresponding 436 // progress. If auto-resize is enabled, this should update the corresponding
461 // view size. 437 // view size.
462 IPC_STRUCT_MEMBER(gfx::Size, view_size) 438 IPC_STRUCT_MEMBER(gfx::Size, view_size)
463 439
464 // The following describes the various bits that may be set in flags: 440 // The following describes the various bits that may be set in flags:
465 // 441 //
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 // true) focusable element. 1147 // true) focusable element.
1172 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, 1148 IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
1173 bool /* reverse */) 1149 bool /* reverse */)
1174 1150
1175 // Required for opening a date/time dialog 1151 // Required for opening a date/time dialog
1176 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog, 1152 IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
1177 ViewHostMsg_DateTimeDialogValue_Params /* value */) 1153 ViewHostMsg_DateTimeDialogValue_Params /* value */)
1178 1154
1179 // Required for updating text input state. 1155 // Required for updating text input state.
1180 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged, 1156 IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
1181 ViewHostMsg_TextInputState_Params /* input state params */) 1157 content::TextInputState /* input state */)
1182 1158
1183 // Sent when the renderer changes the zoom level for a particular url, so the 1159 // Sent when the renderer changes the zoom level for a particular url, so the
1184 // browser can update its records. If the view is a plugin doc, then url is 1160 // browser can update its records. If the view is a plugin doc, then url is
1185 // used to update the zoom level for all pages in that site. Otherwise, the 1161 // used to update the zoom level for all pages in that site. Otherwise, the
1186 // render view's id is used so that only the menu is updated. 1162 // render view's id is used so that only the menu is updated.
1187 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL, 1163 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidZoomURL,
1188 double /* zoom_level */, 1164 double /* zoom_level */,
1189 GURL /* url */) 1165 GURL /* url */)
1190 1166
1191 // Sent when the renderer changes its page scale factor. 1167 // Sent when the renderer changes its page scale factor.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 // Instructs the browser to start plugin IME. 1287 // Instructs the browser to start plugin IME.
1312 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) 1288 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
1313 1289
1314 // Receives content of a web page as plain text. 1290 // Receives content of a web page as plain text.
1315 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) 1291 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string)
1316 #endif 1292 #endif
1317 1293
1318 // Adding a new message? Stick to the sort order above: first platform 1294 // Adding a new message? Stick to the sort order above: first platform
1319 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 1295 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1320 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 1296 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698