OLD | NEW |
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 "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/common/content_param_traits.h" | 11 #include "content/common/content_param_traits.h" |
12 #include "content/common/edit_command.h" | 12 #include "content/common/edit_command.h" |
13 #include "content/common/input/did_overscroll_params.h" | 13 #include "content/common/input/did_overscroll_params.h" |
14 #include "content/common/input/input_event.h" | 14 #include "content/common/input/input_event.h" |
15 #include "content/common/input/input_event_ack_state.h" | 15 #include "content/common/input/input_event_ack_state.h" |
16 #include "content/common/input/input_param_traits.h" | 16 #include "content/common/input/input_param_traits.h" |
17 #include "content/common/input/synthetic_gesture_packet.h" | 17 #include "content/common/input/synthetic_gesture_packet.h" |
18 #include "content/common/input/synthetic_gesture_params.h" | 18 #include "content/common/input/synthetic_gesture_params.h" |
19 #include "content/common/input/synthetic_pinch_gesture_params.h" | 19 #include "content/common/input/synthetic_pinch_gesture_params.h" |
20 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 20 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
21 #include "content/common/input/synthetic_tap_gesture_params.h" | 21 #include "content/common/input/synthetic_tap_gesture_params.h" |
22 #include "content/common/input/touch_action.h" | 22 #include "content/common/input/touch_action.h" |
23 #include "content/public/common/common_param_traits.h" | 23 #include "content/public/common/common_param_traits.h" |
24 #include "ipc/ipc_message_macros.h" | 24 #include "ipc/ipc_message_macros.h" |
25 #include "third_party/WebKit/public/web/WebInputEvent.h" | 25 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 26 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
26 #include "ui/events/ipc/latency_info_param_traits.h" | 27 #include "ui/events/ipc/latency_info_param_traits.h" |
27 #include "ui/gfx/geometry/point.h" | 28 #include "ui/gfx/geometry/point.h" |
28 #include "ui/gfx/geometry/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
29 #include "ui/gfx/geometry/vector2d_f.h" | 30 #include "ui/gfx/geometry/vector2d_f.h" |
30 #include "ui/gfx/ipc/gfx_param_traits.h" | 31 #include "ui/gfx/ipc/gfx_param_traits.h" |
31 #include "ui/gfx/range/range.h" | 32 #include "ui/gfx/range/range.h" |
32 | 33 |
33 #undef IPC_MESSAGE_EXPORT | 34 #undef IPC_MESSAGE_EXPORT |
34 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 35 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
35 | 36 |
36 #ifdef IPC_MESSAGE_START | 37 #ifdef IPC_MESSAGE_START |
37 #error IPC_MESSAGE_START | 38 #error IPC_MESSAGE_START |
38 #endif | 39 #endif |
39 | 40 |
40 #define IPC_MESSAGE_START InputMsgStart | 41 #define IPC_MESSAGE_START InputMsgStart |
41 | 42 |
42 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, | 43 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, |
43 content::INPUT_EVENT_ACK_STATE_MAX) | 44 content::INPUT_EVENT_ACK_STATE_MAX) |
44 IPC_ENUM_TRAITS_MAX_VALUE( | 45 IPC_ENUM_TRAITS_MAX_VALUE( |
45 content::SyntheticGestureParams::GestureSourceType, | 46 content::SyntheticGestureParams::GestureSourceType, |
46 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) | 47 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) |
47 IPC_ENUM_TRAITS_MAX_VALUE( | 48 IPC_ENUM_TRAITS_MAX_VALUE( |
48 content::SyntheticGestureParams::GestureType, | 49 content::SyntheticGestureParams::GestureType, |
49 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) | 50 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) |
| 51 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebLocalFrame::TextGranularity, |
| 52 blink::WebLocalFrame::TextGranularityLast) |
50 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, ( | 53 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, ( |
51 value >= 0 && | 54 value >= 0 && |
52 value <= content::TOUCH_ACTION_MAX && | 55 value <= content::TOUCH_ACTION_MAX && |
53 (!(value & content::TOUCH_ACTION_NONE) || | 56 (!(value & content::TOUCH_ACTION_NONE) || |
54 (value == content::TOUCH_ACTION_NONE)) && | 57 (value == content::TOUCH_ACTION_NONE)) && |
55 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) || | 58 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) || |
56 (value == content::TOUCH_ACTION_MANIPULATION)))) | 59 (value == content::TOUCH_ACTION_MANIPULATION)))) |
57 | 60 |
58 IPC_STRUCT_TRAITS_BEGIN(content::DidOverscrollParams) | 61 IPC_STRUCT_TRAITS_BEGIN(content::DidOverscrollParams) |
59 IPC_STRUCT_TRAITS_MEMBER(accumulated_overscroll) | 62 IPC_STRUCT_TRAITS_MEMBER(accumulated_overscroll) |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 IPC_MESSAGE_ROUTED0(InputMsg_Unselect) | 203 IPC_MESSAGE_ROUTED0(InputMsg_Unselect) |
201 | 204 |
202 // Requests the renderer to select the region between two points. | 205 // Requests the renderer to select the region between two points. |
203 // Expects a SelectRange_ACK message when finished. | 206 // Expects a SelectRange_ACK message when finished. |
204 IPC_MESSAGE_ROUTED2(InputMsg_SelectRange, | 207 IPC_MESSAGE_ROUTED2(InputMsg_SelectRange, |
205 gfx::Point /* base */, | 208 gfx::Point /* base */, |
206 gfx::Point /* extent */) | 209 gfx::Point /* extent */) |
207 | 210 |
208 // Requests the renderer to move the selection extent point to a new position. | 211 // Requests the renderer to move the selection extent point to a new position. |
209 // Expects a MoveRangeSelectionExtent_ACK message when finished. | 212 // Expects a MoveRangeSelectionExtent_ACK message when finished. |
210 IPC_MESSAGE_ROUTED1(InputMsg_MoveRangeSelectionExtent, | 213 IPC_MESSAGE_ROUTED2(InputMsg_MoveRangeSelectionExtent, |
211 gfx::Point /* extent */) | 214 gfx::Point /* extent */, |
| 215 blink::WebLocalFrame::TextGranularity /* granularity */) |
212 | 216 |
213 // Requests the renderer to move the caret selection toward the point. | 217 // Requests the renderer to move the caret selection toward the point. |
214 // Expects a MoveCaret_ACK message when finished. | 218 // Expects a MoveCaret_ACK message when finished. |
215 IPC_MESSAGE_ROUTED1(InputMsg_MoveCaret, | 219 IPC_MESSAGE_ROUTED1(InputMsg_MoveCaret, |
216 gfx::Point /* location */) | 220 gfx::Point /* location */) |
217 | 221 |
218 #if defined(OS_ANDROID) | 222 #if defined(OS_ANDROID) |
219 // Sent when the user clicks on the find result bar to activate a find result. | 223 // Sent when the user clicks on the find result bar to activate a find result. |
220 // The point (x,y) is in fractions of the content document's width and height. | 224 // The point (x,y) is in fractions of the content document's width and height. |
221 IPC_MESSAGE_ROUTED3(InputMsg_ActivateNearestFindResult, | 225 IPC_MESSAGE_ROUTED3(InputMsg_ActivateNearestFindResult, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // This IPC message sends the character bounds after every composition change | 264 // This IPC message sends the character bounds after every composition change |
261 // to always have correct bound info. | 265 // to always have correct bound info. |
262 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, | 266 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, |
263 gfx::Range /* composition range */, | 267 gfx::Range /* composition range */, |
264 std::vector<gfx::Rect> /* character bounds */) | 268 std::vector<gfx::Rect> /* character bounds */) |
265 | 269 |
266 // Adding a new message? Stick to the sort order above: first platform | 270 // Adding a new message? Stick to the sort order above: first platform |
267 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 271 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
268 // platform independent InputHostMsg, then ifdefs for platform specific | 272 // platform independent InputHostMsg, then ifdefs for platform specific |
269 // InputHostMsg. | 273 // InputHostMsg. |
OLD | NEW |