Chromium Code Reviews| 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/input_event.h" | 14 #include "content/common/input/input_event.h" |
| 15 #include "content/common/input/input_event_ack.h" | |
| 14 #include "content/common/input/input_event_ack_state.h" | 16 #include "content/common/input/input_event_ack_state.h" |
| 15 #include "content/common/input/input_param_traits.h" | 17 #include "content/common/input/input_param_traits.h" |
| 16 #include "content/common/input/synthetic_gesture_packet.h" | 18 #include "content/common/input/synthetic_gesture_packet.h" |
| 17 #include "content/common/input/synthetic_gesture_params.h" | 19 #include "content/common/input/synthetic_gesture_params.h" |
| 18 #include "content/common/input/synthetic_pinch_gesture_params.h" | 20 #include "content/common/input/synthetic_pinch_gesture_params.h" |
| 19 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 21 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 20 #include "content/common/input/synthetic_tap_gesture_params.h" | 22 #include "content/common/input/synthetic_tap_gesture_params.h" |
| 21 #include "content/public/common/common_param_traits.h" | 23 #include "content/public/common/common_param_traits.h" |
| 22 #include "content/common/input/touch_action.h" | 24 #include "content/common/input/touch_action.h" |
| 23 #include "ipc/ipc_message_macros.h" | 25 #include "ipc/ipc_message_macros.h" |
| 24 #include "third_party/WebKit/public/web/WebInputEvent.h" | 26 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 25 #include "ui/events/latency_info.h" | 27 #include "ui/events/latency_info.h" |
| 26 #include "ui/gfx/point.h" | 28 #include "ui/gfx/point.h" |
| 27 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/rect.h" |
| 30 #include "ui/gfx/vector2d_f.h" | |
| 28 | 31 |
| 29 #undef IPC_MESSAGE_EXPORT | 32 #undef IPC_MESSAGE_EXPORT |
| 30 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 33 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 31 | 34 |
| 32 #ifdef IPC_MESSAGE_START | 35 #ifdef IPC_MESSAGE_START |
| 33 #error IPC_MESSAGE_START | 36 #error IPC_MESSAGE_START |
| 34 #endif | 37 #endif |
| 35 | 38 |
| 36 #define IPC_MESSAGE_START InputMsgStart | 39 #define IPC_MESSAGE_START InputMsgStart |
| 37 | 40 |
| 38 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, | 41 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, |
| 39 content::INPUT_EVENT_ACK_STATE_MAX) | 42 content::INPUT_EVENT_ACK_STATE_MAX) |
| 40 IPC_ENUM_TRAITS_MAX_VALUE( | 43 IPC_ENUM_TRAITS_MAX_VALUE( |
| 41 content::SyntheticGestureParams::GestureSourceType, | 44 content::SyntheticGestureParams::GestureSourceType, |
| 42 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) | 45 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) |
| 43 IPC_ENUM_TRAITS_MAX_VALUE( | 46 IPC_ENUM_TRAITS_MAX_VALUE( |
| 44 content::SyntheticGestureParams::GestureType, | 47 content::SyntheticGestureParams::GestureType, |
| 45 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) | 48 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) |
| 46 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, ( | 49 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, ( |
| 47 value >= 0 && | 50 value >= 0 && |
| 48 value <= content::TOUCH_ACTION_MAX && | 51 value <= content::TOUCH_ACTION_MAX && |
| 49 (!(value & content::TOUCH_ACTION_NONE) || | 52 (!(value & content::TOUCH_ACTION_NONE) || |
| 50 (value == content::TOUCH_ACTION_NONE)) && | 53 (value == content::TOUCH_ACTION_NONE)) && |
| 51 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) || | 54 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) || |
| 52 (value == content::TOUCH_ACTION_MANIPULATION)))) | 55 (value == content::TOUCH_ACTION_MANIPULATION)))) |
| 53 | 56 |
| 57 IPC_STRUCT_TRAITS_BEGIN(content::DidOverscrollParams) | |
| 58 IPC_STRUCT_TRAITS_MEMBER(accumulated_overscroll) | |
| 59 IPC_STRUCT_TRAITS_MEMBER(latest_overscroll_delta) | |
| 60 IPC_STRUCT_TRAITS_MEMBER(current_fling_velocity) | |
| 61 IPC_STRUCT_TRAITS_END() | |
| 62 | |
| 54 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) | 63 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) |
| 55 IPC_STRUCT_TRAITS_MEMBER(name) | 64 IPC_STRUCT_TRAITS_MEMBER(name) |
| 56 IPC_STRUCT_TRAITS_MEMBER(value) | 65 IPC_STRUCT_TRAITS_MEMBER(value) |
| 57 IPC_STRUCT_TRAITS_END() | 66 IPC_STRUCT_TRAITS_END() |
| 58 | 67 |
| 59 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) | 68 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) |
| 60 IPC_STRUCT_TRAITS_MEMBER(web_event) | 69 IPC_STRUCT_TRAITS_MEMBER(web_event) |
| 61 IPC_STRUCT_TRAITS_MEMBER(latency_info) | 70 IPC_STRUCT_TRAITS_MEMBER(latency_info) |
| 62 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) | 71 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) |
| 63 IPC_STRUCT_TRAITS_END() | 72 IPC_STRUCT_TRAITS_END() |
| 64 | 73 |
| 74 IPC_STRUCT_TRAITS_BEGIN(content::InputEventAck) | |
| 75 IPC_STRUCT_TRAITS_MEMBER(type) | |
| 76 IPC_STRUCT_TRAITS_MEMBER(state) | |
| 77 IPC_STRUCT_TRAITS_MEMBER(latency) | |
| 78 IPC_STRUCT_TRAITS_MEMBER(overscroll) | |
| 79 IPC_STRUCT_TRAITS_END() | |
| 80 | |
| 65 IPC_STRUCT_TRAITS_BEGIN(content::SyntheticGestureParams) | 81 IPC_STRUCT_TRAITS_BEGIN(content::SyntheticGestureParams) |
| 66 IPC_STRUCT_TRAITS_MEMBER(gesture_source_type) | 82 IPC_STRUCT_TRAITS_MEMBER(gesture_source_type) |
| 67 IPC_STRUCT_TRAITS_END() | 83 IPC_STRUCT_TRAITS_END() |
| 68 | 84 |
| 69 IPC_STRUCT_TRAITS_BEGIN(content::SyntheticSmoothScrollGestureParams) | 85 IPC_STRUCT_TRAITS_BEGIN(content::SyntheticSmoothScrollGestureParams) |
| 70 IPC_STRUCT_TRAITS_PARENT(content::SyntheticGestureParams) | 86 IPC_STRUCT_TRAITS_PARENT(content::SyntheticGestureParams) |
| 71 IPC_STRUCT_TRAITS_MEMBER(anchor) | 87 IPC_STRUCT_TRAITS_MEMBER(anchor) |
| 72 IPC_STRUCT_TRAITS_MEMBER(distances) | 88 IPC_STRUCT_TRAITS_MEMBER(distances) |
| 73 IPC_STRUCT_TRAITS_MEMBER(prevent_fling) | 89 IPC_STRUCT_TRAITS_MEMBER(prevent_fling) |
| 74 IPC_STRUCT_TRAITS_MEMBER(speed_in_pixels_s) | 90 IPC_STRUCT_TRAITS_MEMBER(speed_in_pixels_s) |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 float /* x */, | 186 float /* x */, |
| 171 float /* y */) | 187 float /* y */) |
| 172 #endif | 188 #endif |
| 173 | 189 |
| 174 IPC_MESSAGE_ROUTED0(InputMsg_SyntheticGestureCompleted); | 190 IPC_MESSAGE_ROUTED0(InputMsg_SyntheticGestureCompleted); |
| 175 | 191 |
| 176 // ----------------------------------------------------------------------------- | 192 // ----------------------------------------------------------------------------- |
| 177 // Messages sent from the renderer to the browser. | 193 // Messages sent from the renderer to the browser. |
| 178 | 194 |
| 179 // Acknowledges receipt of a InputMsg_HandleInputEvent message. | 195 // Acknowledges receipt of a InputMsg_HandleInputEvent message. |
| 180 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, | 196 IPC_MESSAGE_ROUTED1(InputHostMsg_HandleInputEvent_ACK, |
| 181 blink::WebInputEvent::Type, | 197 content::InputEventAck /* ack */) |
| 182 content::InputEventAckState /* ack_result */, | |
| 183 ui::LatencyInfo /* latency_info */) | |
| 184 | 198 |
| 185 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, | 199 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, |
| 186 content::SyntheticGesturePacket) | 200 content::SyntheticGesturePacket) |
| 187 | 201 |
| 188 // Notifies the allowed touch actions for a new touch point. | 202 // Notifies the allowed touch actions for a new touch point. |
| 189 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, | 203 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, |
| 190 content::TouchAction /* touch_action */) | 204 content::TouchAction /* touch_action */) |
| 191 | 205 |
| 206 // Sent by the compositor when input scroll events are dropped due to bounds | |
| 207 // restricions on the root scroll offset. | |
|
tdresser
2014/05/14 18:20:08
restricions -> restrictions
jdduke (slow)
2014/05/19 20:48:03
Done.
| |
| 208 IPC_MESSAGE_ROUTED1(InputHostMsg_DidOverscroll, | |
| 209 content::DidOverscrollParams /* params */) | |
| 210 | |
| 192 // Adding a new message? Stick to the sort order above: first platform | 211 // Adding a new message? Stick to the sort order above: first platform |
| 193 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 212 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
| 194 // platform independent InputHostMsg, then ifdefs for platform specific | 213 // platform independent InputHostMsg, then ifdefs for platform specific |
| 195 // InputHostMsg. | 214 // InputHostMsg. |
| OLD | NEW |