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/input_event.h" | 13 #include "content/common/input/input_event.h" |
14 #include "content/common/input/input_param_traits.h" | 14 #include "content/common/input/input_param_traits.h" |
15 #include "content/common/input/synthetic_gesture_packet.h" | 15 #include "content/common/input/synthetic_gesture_packet.h" |
16 #include "content/common/input/synthetic_gesture_params.h" | 16 #include "content/common/input/synthetic_gesture_params.h" |
17 #include "content/common/input/synthetic_pinch_gesture_params.h" | 17 #include "content/common/input/synthetic_pinch_gesture_params.h" |
18 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 18 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
19 #include "content/port/common/input_event_ack_state.h" | 19 #include "content/port/common/input_event_ack_state.h" |
20 #include "content/public/common/common_param_traits.h" | 20 #include "content/public/common/common_param_traits.h" |
| 21 #include "content/common/input/touch_action.h" |
21 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
22 #include "third_party/WebKit/public/web/WebInputEvent.h" | 23 #include "third_party/WebKit/public/web/WebInputEvent.h" |
23 #include "ui/events/latency_info.h" | 24 #include "ui/events/latency_info.h" |
24 #include "ui/gfx/point.h" | 25 #include "ui/gfx/point.h" |
25 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
26 | 27 |
27 #undef IPC_MESSAGE_EXPORT | 28 #undef IPC_MESSAGE_EXPORT |
28 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 29 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
29 | 30 |
30 #ifdef IPC_MESSAGE_START | 31 #ifdef IPC_MESSAGE_START |
31 #error IPC_MESSAGE_START | 32 #error IPC_MESSAGE_START |
32 #endif | 33 #endif |
33 | 34 |
34 #define IPC_MESSAGE_START InputMsgStart | 35 #define IPC_MESSAGE_START InputMsgStart |
35 | 36 |
36 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, | 37 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, |
37 content::INPUT_EVENT_ACK_STATE_MAX) | 38 content::INPUT_EVENT_ACK_STATE_MAX) |
38 IPC_ENUM_TRAITS_MAX_VALUE( | 39 IPC_ENUM_TRAITS_MAX_VALUE( |
39 content::SyntheticGestureParams::GestureSourceType, | 40 content::SyntheticGestureParams::GestureSourceType, |
40 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) | 41 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) |
41 IPC_ENUM_TRAITS_MAX_VALUE( | 42 IPC_ENUM_TRAITS_MAX_VALUE( |
42 content::SyntheticGestureParams::GestureType, | 43 content::SyntheticGestureParams::GestureType, |
43 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) | 44 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) |
| 45 IPC_ENUM_TRAITS_MAX_VALUE(content::TouchAction, |
| 46 content::TOUCH_ACTION_MAX) |
44 | 47 |
45 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) | 48 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) |
46 IPC_STRUCT_TRAITS_MEMBER(name) | 49 IPC_STRUCT_TRAITS_MEMBER(name) |
47 IPC_STRUCT_TRAITS_MEMBER(value) | 50 IPC_STRUCT_TRAITS_MEMBER(value) |
48 IPC_STRUCT_TRAITS_END() | 51 IPC_STRUCT_TRAITS_END() |
49 | 52 |
50 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) | 53 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) |
51 IPC_STRUCT_TRAITS_MEMBER(web_event) | 54 IPC_STRUCT_TRAITS_MEMBER(web_event) |
52 IPC_STRUCT_TRAITS_MEMBER(latency_info) | 55 IPC_STRUCT_TRAITS_MEMBER(latency_info) |
53 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) | 56 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 170 |
168 // Acknowledges receipt of a InputMsg_HandleInputEvent message. | 171 // Acknowledges receipt of a InputMsg_HandleInputEvent message. |
169 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, | 172 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, |
170 blink::WebInputEvent::Type, | 173 blink::WebInputEvent::Type, |
171 content::InputEventAckState /* ack_result */, | 174 content::InputEventAckState /* ack_result */, |
172 ui::LatencyInfo /* latency_info */) | 175 ui::LatencyInfo /* latency_info */) |
173 | 176 |
174 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, | 177 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, |
175 content::SyntheticGesturePacket) | 178 content::SyntheticGesturePacket) |
176 | 179 |
| 180 // Notifies the allowed touch actions for a new touch point. |
| 181 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, |
| 182 content::TouchAction /* touch_action */) |
177 | 183 |
178 // Adding a new message? Stick to the sort order above: first platform | 184 // Adding a new message? Stick to the sort order above: first platform |
179 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 185 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
180 // platform independent InputHostMsg, then ifdefs for platform specific | 186 // platform independent InputHostMsg, then ifdefs for platform specific |
181 // InputHostMsg. | 187 // InputHostMsg. |
OLD | NEW |