| 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 "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/common/content_param_traits.h" | 12 #include "content/common/content_param_traits.h" |
| 13 #include "content/common/edit_command.h" | 13 #include "content/common/edit_command.h" |
| 14 #include "content/common/input/did_overscroll_params.h" | |
| 15 #include "content/common/input/input_event.h" | 14 #include "content/common/input/input_event.h" |
| 16 #include "content/common/input/input_event_ack.h" | 15 #include "content/common/input/input_event_ack.h" |
| 17 #include "content/common/input/input_event_ack_state.h" | 16 #include "content/common/input/input_event_ack_state.h" |
| 18 #include "content/common/input/input_event_dispatch_type.h" | 17 #include "content/common/input/input_event_dispatch_type.h" |
| 19 #include "content/common/input/input_param_traits.h" | 18 #include "content/common/input/input_param_traits.h" |
| 20 #include "content/common/input/synthetic_gesture_packet.h" | 19 #include "content/common/input/synthetic_gesture_packet.h" |
| 21 #include "content/common/input/synthetic_gesture_params.h" | 20 #include "content/common/input/synthetic_gesture_params.h" |
| 22 #include "content/common/input/synthetic_pinch_gesture_params.h" | 21 #include "content/common/input/synthetic_pinch_gesture_params.h" |
| 23 #include "content/common/input/synthetic_pointer_action_params.h" | 22 #include "content/common/input/synthetic_pointer_action_params.h" |
| 24 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" | 23 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" |
| 25 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 24 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 26 #include "content/common/input/synthetic_tap_gesture_params.h" | 25 #include "content/common/input/synthetic_tap_gesture_params.h" |
| 27 #include "content/common/input/touch_action.h" | 26 #include "content/common/input/touch_action.h" |
| 28 #include "ipc/ipc_message_macros.h" | 27 #include "ipc/ipc_message_macros.h" |
| 29 #include "third_party/WebKit/public/web/WebInputEvent.h" | 28 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 29 #include "ui/events/blink/did_overscroll_params.h" |
| 30 #include "ui/events/ipc/latency_info_param_traits.h" | 30 #include "ui/events/ipc/latency_info_param_traits.h" |
| 31 #include "ui/gfx/geometry/point.h" | 31 #include "ui/gfx/geometry/point.h" |
| 32 #include "ui/gfx/geometry/rect.h" | 32 #include "ui/gfx/geometry/rect.h" |
| 33 #include "ui/gfx/geometry/vector2d_f.h" | 33 #include "ui/gfx/geometry/vector2d_f.h" |
| 34 #include "ui/gfx/ipc/gfx_param_traits.h" | 34 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 35 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" | 35 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" |
| 36 #include "ui/gfx/range/range.h" | 36 #include "ui/gfx/range/range.h" |
| 37 | 37 |
| 38 #undef IPC_MESSAGE_EXPORT | 38 #undef IPC_MESSAGE_EXPORT |
| 39 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 39 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| (...skipping 17 matching lines...) Expand all Loading... |
| 57 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventDispatchType, | 57 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventDispatchType, |
| 58 content::InputEventDispatchType::DISPATCH_TYPE_MAX) | 58 content::InputEventDispatchType::DISPATCH_TYPE_MAX) |
| 59 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, ( | 59 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, ( |
| 60 value >= 0 && | 60 value >= 0 && |
| 61 value <= content::TOUCH_ACTION_MAX && | 61 value <= content::TOUCH_ACTION_MAX && |
| 62 (!(value & content::TOUCH_ACTION_NONE) || | 62 (!(value & content::TOUCH_ACTION_NONE) || |
| 63 (value == content::TOUCH_ACTION_NONE)) && | 63 (value == content::TOUCH_ACTION_NONE)) && |
| 64 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) || | 64 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) || |
| 65 (value == content::TOUCH_ACTION_MANIPULATION)))) | 65 (value == content::TOUCH_ACTION_MANIPULATION)))) |
| 66 | 66 |
| 67 IPC_STRUCT_TRAITS_BEGIN(content::DidOverscrollParams) | 67 IPC_STRUCT_TRAITS_BEGIN(ui::DidOverscrollParams) |
| 68 IPC_STRUCT_TRAITS_MEMBER(accumulated_overscroll) | 68 IPC_STRUCT_TRAITS_MEMBER(accumulated_overscroll) |
| 69 IPC_STRUCT_TRAITS_MEMBER(latest_overscroll_delta) | 69 IPC_STRUCT_TRAITS_MEMBER(latest_overscroll_delta) |
| 70 IPC_STRUCT_TRAITS_MEMBER(current_fling_velocity) | 70 IPC_STRUCT_TRAITS_MEMBER(current_fling_velocity) |
| 71 IPC_STRUCT_TRAITS_MEMBER(causal_event_viewport_point) | 71 IPC_STRUCT_TRAITS_MEMBER(causal_event_viewport_point) |
| 72 IPC_STRUCT_TRAITS_END() | 72 IPC_STRUCT_TRAITS_END() |
| 73 | 73 |
| 74 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) | 74 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) |
| 75 IPC_STRUCT_TRAITS_MEMBER(name) | 75 IPC_STRUCT_TRAITS_MEMBER(name) |
| 76 IPC_STRUCT_TRAITS_MEMBER(value) | 76 IPC_STRUCT_TRAITS_MEMBER(value) |
| 77 IPC_STRUCT_TRAITS_END() | 77 IPC_STRUCT_TRAITS_END() |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, | 279 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, |
| 280 content::SyntheticGesturePacket) | 280 content::SyntheticGesturePacket) |
| 281 | 281 |
| 282 // Notifies the allowed touch actions for a new touch point. | 282 // Notifies the allowed touch actions for a new touch point. |
| 283 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, | 283 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, |
| 284 content::TouchAction /* touch_action */) | 284 content::TouchAction /* touch_action */) |
| 285 | 285 |
| 286 // Sent by the compositor when input scroll events are dropped due to bounds | 286 // Sent by the compositor when input scroll events are dropped due to bounds |
| 287 // restrictions on the root scroll offset. | 287 // restrictions on the root scroll offset. |
| 288 IPC_MESSAGE_ROUTED1(InputHostMsg_DidOverscroll, | 288 IPC_MESSAGE_ROUTED1(InputHostMsg_DidOverscroll, |
| 289 content::DidOverscrollParams /* params */) | 289 ui::DidOverscrollParams /* params */) |
| 290 | 290 |
| 291 // Sent by the compositor when a fling animation is stopped. | 291 // Sent by the compositor when a fling animation is stopped. |
| 292 IPC_MESSAGE_ROUTED0(InputHostMsg_DidStopFlinging) | 292 IPC_MESSAGE_ROUTED0(InputHostMsg_DidStopFlinging) |
| 293 | 293 |
| 294 // Acknowledges receipt of a InputMsg_MoveCaret message. | 294 // Acknowledges receipt of a InputMsg_MoveCaret message. |
| 295 IPC_MESSAGE_ROUTED0(InputHostMsg_MoveCaret_ACK) | 295 IPC_MESSAGE_ROUTED0(InputHostMsg_MoveCaret_ACK) |
| 296 | 296 |
| 297 // Acknowledges receipt of a InputMsg_MoveRangeSelectionExtent message. | 297 // Acknowledges receipt of a InputMsg_MoveRangeSelectionExtent message. |
| 298 IPC_MESSAGE_ROUTED0(InputHostMsg_MoveRangeSelectionExtent_ACK) | 298 IPC_MESSAGE_ROUTED0(InputHostMsg_MoveRangeSelectionExtent_ACK) |
| 299 | 299 |
| 300 // Acknowledges receipt of a InputMsg_SelectRange message. | 300 // Acknowledges receipt of a InputMsg_SelectRange message. |
| 301 IPC_MESSAGE_ROUTED0(InputHostMsg_SelectRange_ACK) | 301 IPC_MESSAGE_ROUTED0(InputHostMsg_SelectRange_ACK) |
| 302 | 302 |
| 303 // Required for cancelling an ongoing input method composition. | 303 // Required for cancelling an ongoing input method composition. |
| 304 IPC_MESSAGE_ROUTED0(InputHostMsg_ImeCancelComposition) | 304 IPC_MESSAGE_ROUTED0(InputHostMsg_ImeCancelComposition) |
| 305 | 305 |
| 306 // This IPC message sends the character bounds after every composition change | 306 // This IPC message sends the character bounds after every composition change |
| 307 // to always have correct bound info. | 307 // to always have correct bound info. |
| 308 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, | 308 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, |
| 309 gfx::Range /* composition range */, | 309 gfx::Range /* composition range */, |
| 310 std::vector<gfx::Rect> /* character bounds */) | 310 std::vector<gfx::Rect> /* character bounds */) |
| 311 | 311 |
| 312 // Adding a new message? Stick to the sort order above: first platform | 312 // Adding a new message? Stick to the sort order above: first platform |
| 313 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 313 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
| 314 // platform independent InputHostMsg, then ifdefs for platform specific | 314 // platform independent InputHostMsg, then ifdefs for platform specific |
| 315 // InputHostMsg. | 315 // InputHostMsg. |
| OLD | NEW |