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_params.h" | 15 #include "content/common/input/synthetic_gesture_params.h" |
16 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 16 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
17 #include "content/port/common/input_event_ack_state.h" | 17 #include "content/port/common/input_event_ack_state.h" |
18 #include "content/public/common/common_param_traits.h" | 18 #include "content/public/common/common_param_traits.h" |
| 19 #include "content/common/input/touch_action.h" |
19 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
20 #include "third_party/WebKit/public/web/WebInputEvent.h" | 21 #include "third_party/WebKit/public/web/WebInputEvent.h" |
21 #include "ui/events/latency_info.h" | 22 #include "ui/events/latency_info.h" |
22 #include "ui/gfx/point.h" | 23 #include "ui/gfx/point.h" |
23 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
24 | 25 |
25 #undef IPC_MESSAGE_EXPORT | 26 #undef IPC_MESSAGE_EXPORT |
26 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 27 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
27 | 28 |
28 #ifdef IPC_MESSAGE_START | 29 #ifdef IPC_MESSAGE_START |
29 #error IPC_MESSAGE_START | 30 #error IPC_MESSAGE_START |
30 #endif | 31 #endif |
31 | 32 |
32 #define IPC_MESSAGE_START InputMsgStart | 33 #define IPC_MESSAGE_START InputMsgStart |
33 | 34 |
34 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, | 35 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, |
35 content::INPUT_EVENT_ACK_STATE_MAX) | 36 content::INPUT_EVENT_ACK_STATE_MAX) |
36 IPC_ENUM_TRAITS_MAX_VALUE( | 37 IPC_ENUM_TRAITS_MAX_VALUE( |
37 content::SyntheticGestureParams::GestureSourceType, | 38 content::SyntheticGestureParams::GestureSourceType, |
38 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) | 39 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) |
39 IPC_ENUM_TRAITS_MAX_VALUE( | 40 IPC_ENUM_TRAITS_MAX_VALUE( |
40 content::SyntheticGestureParams::GestureType, | 41 content::SyntheticGestureParams::GestureType, |
41 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) | 42 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) |
| 43 IPC_ENUM_TRAITS(content::TouchAction) |
42 | 44 |
43 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) | 45 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) |
44 IPC_STRUCT_TRAITS_MEMBER(name) | 46 IPC_STRUCT_TRAITS_MEMBER(name) |
45 IPC_STRUCT_TRAITS_MEMBER(value) | 47 IPC_STRUCT_TRAITS_MEMBER(value) |
46 IPC_STRUCT_TRAITS_END() | 48 IPC_STRUCT_TRAITS_END() |
47 | 49 |
48 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) | 50 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) |
49 IPC_STRUCT_TRAITS_MEMBER(web_event) | 51 IPC_STRUCT_TRAITS_MEMBER(web_event) |
50 IPC_STRUCT_TRAITS_MEMBER(latency_info) | 52 IPC_STRUCT_TRAITS_MEMBER(latency_info) |
51 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) | 53 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 154 |
153 // ----------------------------------------------------------------------------- | 155 // ----------------------------------------------------------------------------- |
154 // Messages sent from the renderer to the browser. | 156 // Messages sent from the renderer to the browser. |
155 | 157 |
156 // Acknowledges receipt of a InputMsg_HandleInputEvent message. | 158 // Acknowledges receipt of a InputMsg_HandleInputEvent message. |
157 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, | 159 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, |
158 blink::WebInputEvent::Type, | 160 blink::WebInputEvent::Type, |
159 content::InputEventAckState /* ack_result */, | 161 content::InputEventAckState /* ack_result */, |
160 ui::LatencyInfo /* latency_info */) | 162 ui::LatencyInfo /* latency_info */) |
161 | 163 |
| 164 // Notifies the allowed touch actions for a new touch point. |
| 165 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, |
| 166 content::TouchAction /* touch_action */) |
162 | 167 |
163 // Adding a new message? Stick to the sort order above: first platform | 168 // Adding a new message? Stick to the sort order above: first platform |
164 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 169 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
165 // platform independent InputHostMsg, then ifdefs for platform specific | 170 // platform independent InputHostMsg, then ifdefs for platform specific |
166 // InputHostMsg. | 171 // InputHostMsg. |
OLD | NEW |