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

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

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Created 3 years, 10 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 input events and other messages that require processing in 5 // IPC messages for input events and other messages that require processing in
6 // order relative to input events. 6 // order relative to input events.
7 // Multiply-included message file, hence no include guard. 7 // Multiply-included message file, hence no include guard.
8 8
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/common/input/synthetic_gesture_params.h" 21 #include "content/common/input/synthetic_gesture_params.h"
22 #include "content/common/input/synthetic_pinch_gesture_params.h" 22 #include "content/common/input/synthetic_pinch_gesture_params.h"
23 #include "content/common/input/synthetic_pointer_action_list_params.h" 23 #include "content/common/input/synthetic_pointer_action_list_params.h"
24 #include "content/common/input/synthetic_pointer_action_params.h" 24 #include "content/common/input/synthetic_pointer_action_params.h"
25 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" 25 #include "content/common/input/synthetic_smooth_drag_gesture_params.h"
26 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" 26 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
27 #include "content/common/input/synthetic_tap_gesture_params.h" 27 #include "content/common/input/synthetic_tap_gesture_params.h"
28 #include "content/common/input/touch_action.h" 28 #include "content/common/input/touch_action.h"
29 #include "ipc/ipc_message_macros.h" 29 #include "ipc/ipc_message_macros.h"
30 #include "third_party/WebKit/public/platform/WebInputEvent.h" 30 #include "third_party/WebKit/public/platform/WebInputEvent.h"
31 #include "third_party/WebKit/public/web/WebTextSuggestionInfo.h"
31 #include "ui/events/blink/did_overscroll_params.h" 32 #include "ui/events/blink/did_overscroll_params.h"
32 #include "ui/events/ipc/latency_info_param_traits.h" 33 #include "ui/events/ipc/latency_info_param_traits.h"
33 #include "ui/gfx/geometry/point.h" 34 #include "ui/gfx/geometry/point.h"
34 #include "ui/gfx/geometry/rect.h" 35 #include "ui/gfx/geometry/rect.h"
35 #include "ui/gfx/geometry/vector2d_f.h" 36 #include "ui/gfx/geometry/vector2d_f.h"
36 #include "ui/gfx/ipc/gfx_param_traits.h" 37 #include "ui/gfx/ipc/gfx_param_traits.h"
37 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" 38 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
38 #include "ui/gfx/range/range.h" 39 #include "ui/gfx/range/range.h"
39 40
40 #undef IPC_MESSAGE_EXPORT 41 #undef IPC_MESSAGE_EXPORT
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 129
129 IPC_STRUCT_TRAITS_BEGIN(content::InputEventAck) 130 IPC_STRUCT_TRAITS_BEGIN(content::InputEventAck)
130 IPC_STRUCT_TRAITS_MEMBER(source) 131 IPC_STRUCT_TRAITS_MEMBER(source)
131 IPC_STRUCT_TRAITS_MEMBER(type) 132 IPC_STRUCT_TRAITS_MEMBER(type)
132 IPC_STRUCT_TRAITS_MEMBER(state) 133 IPC_STRUCT_TRAITS_MEMBER(state)
133 IPC_STRUCT_TRAITS_MEMBER(latency) 134 IPC_STRUCT_TRAITS_MEMBER(latency)
134 IPC_STRUCT_TRAITS_MEMBER(overscroll) 135 IPC_STRUCT_TRAITS_MEMBER(overscroll)
135 IPC_STRUCT_TRAITS_MEMBER(unique_touch_event_id) 136 IPC_STRUCT_TRAITS_MEMBER(unique_touch_event_id)
136 IPC_STRUCT_TRAITS_END() 137 IPC_STRUCT_TRAITS_END()
137 138
139 IPC_STRUCT_TRAITS_BEGIN(blink::WebTextSuggestionInfo)
140 IPC_STRUCT_TRAITS_MEMBER(documentMarkerID)
141 IPC_STRUCT_TRAITS_MEMBER(suggestionStart)
142 IPC_STRUCT_TRAITS_MEMBER(suggestionEnd)
143 IPC_STRUCT_TRAITS_MEMBER(spanStart)
144 IPC_STRUCT_TRAITS_MEMBER(spanEnd)
145 IPC_STRUCT_TRAITS_MEMBER(suggestionIndex)
146 IPC_STRUCT_TRAITS_MEMBER(prefix)
147 IPC_STRUCT_TRAITS_MEMBER(suggestion)
148 IPC_STRUCT_TRAITS_MEMBER(suffix)
149 IPC_STRUCT_TRAITS_END()
150
138 // Sends an input event to the render widget. The input event in general 151 // Sends an input event to the render widget. The input event in general
139 // contains a list of coalesced events and one event that is representative of 152 // contains a list of coalesced events and one event that is representative of
140 // all those events (https://w3c.github.io/pointerevents/extension.html). 153 // all those events (https://w3c.github.io/pointerevents/extension.html).
141 IPC_MESSAGE_ROUTED4( 154 IPC_MESSAGE_ROUTED4(
142 InputMsg_HandleInputEvent, 155 InputMsg_HandleInputEvent,
143 IPC::WebInputEventPointer /* event */, 156 IPC::WebInputEventPointer /* event */,
144 std::vector<IPC::WebInputEventPointer> /* coalesced events */, 157 std::vector<IPC::WebInputEventPointer> /* coalesced events */,
145 ui::LatencyInfo /* latency_info */, 158 ui::LatencyInfo /* latency_info */,
146 content::InputEventDispatchType) 159 content::InputEventDispatchType)
147 160
(...skipping 28 matching lines...) Expand all
176 189
177 // This message sends a string being composed with an input method. 190 // This message sends a string being composed with an input method.
178 IPC_MESSAGE_ROUTED5( 191 IPC_MESSAGE_ROUTED5(
179 InputMsg_ImeSetComposition, 192 InputMsg_ImeSetComposition,
180 base::string16, /* text */ 193 base::string16, /* text */
181 std::vector<blink::WebCompositionUnderline>, /* underlines */ 194 std::vector<blink::WebCompositionUnderline>, /* underlines */
182 gfx::Range /* replacement_range */, 195 gfx::Range /* replacement_range */,
183 int, /* selectiont_start */ 196 int, /* selectiont_start */
184 int /* selection_end */) 197 int /* selection_end */)
185 198
199 IPC_MESSAGE_ROUTED2(InputMsg_ImeApplySuggestionReplacement,
aelias_OOO_until_Jul13 2017/01/25 03:34:26 These do not originate from the IME per se so I'd
200 int /* document_marker_ID */,
201 int /* suggestion_index */)
202
203 IPC_MESSAGE_ROUTED0(InputMsg_ImeDeleteSuggestionHighlight)
aelias_OOO_until_Jul13 2017/01/25 03:34:26 Can this take a marker ID as well instead of infer
rlanday 2017/01/25 18:48:10 This message doesn't take an ID because: - At an
204
205 IPC_MESSAGE_ROUTED0(InputMsg_ImeCloseSuggestionMenu)
aelias_OOO_until_Jul13 2017/01/25 03:34:26 This is more of a notification for something that
206
186 // This message deletes the current composition, inserts specified text, and 207 // This message deletes the current composition, inserts specified text, and
187 // moves the cursor. 208 // moves the cursor.
188 IPC_MESSAGE_ROUTED4( 209 IPC_MESSAGE_ROUTED4(
189 InputMsg_ImeCommitText, 210 InputMsg_ImeCommitText,
190 base::string16 /* text */, 211 base::string16 /* text */,
191 std::vector<blink::WebCompositionUnderline>, /* underlines */ 212 std::vector<blink::WebCompositionUnderline>, /* underlines */
192 gfx::Range /* replacement_range */, 213 gfx::Range /* replacement_range */,
193 int /* relative_cursor_pos */) 214 int /* relative_cursor_pos */)
194 215
195 // This message inserts the ongoing composition. 216 // This message inserts the ongoing composition.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 341
321 // Required for cancelling an ongoing input method composition. 342 // Required for cancelling an ongoing input method composition.
322 IPC_MESSAGE_ROUTED0(InputHostMsg_ImeCancelComposition) 343 IPC_MESSAGE_ROUTED0(InputHostMsg_ImeCancelComposition)
323 344
324 // This IPC message sends the character bounds after every composition change 345 // This IPC message sends the character bounds after every composition change
325 // to always have correct bound info. 346 // to always have correct bound info.
326 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, 347 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged,
327 gfx::Range /* composition range */, 348 gfx::Range /* composition range */,
328 std::vector<gfx::Rect> /* character bounds */) 349 std::vector<gfx::Rect> /* character bounds */)
329 350
351 IPC_MESSAGE_ROUTED1(InputHostMsg_ShowTextSuggestionMenu,
352 std::vector<blink::WebTextSuggestionInfo>)
353
330 // Adding a new message? Stick to the sort order above: first platform 354 // Adding a new message? Stick to the sort order above: first platform
331 // independent InputMsg, then ifdefs for platform specific InputMsg, then 355 // independent InputMsg, then ifdefs for platform specific InputMsg, then
332 // platform independent InputHostMsg, then ifdefs for platform specific 356 // platform independent InputHostMsg, then ifdefs for platform specific
333 // InputHostMsg. 357 // InputHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698