| 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.h" |
| 15 #include "content/common/input/input_event_ack_state.h" | 16 #include "content/common/input/input_event_ack_state.h" |
| 16 #include "content/common/input/input_param_traits.h" | 17 #include "content/common/input/input_param_traits.h" |
| 17 #include "content/common/input/synthetic_gesture_packet.h" | 18 #include "content/common/input/synthetic_gesture_packet.h" |
| 18 #include "content/common/input/synthetic_gesture_params.h" | 19 #include "content/common/input/synthetic_gesture_params.h" |
| 19 #include "content/common/input/synthetic_pinch_gesture_params.h" | 20 #include "content/common/input/synthetic_pinch_gesture_params.h" |
| 20 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" | 21 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" |
| 21 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 22 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 22 #include "content/common/input/synthetic_tap_gesture_params.h" | 23 #include "content/common/input/synthetic_tap_gesture_params.h" |
| 23 #include "content/common/input/touch_action.h" | 24 #include "content/common/input/touch_action.h" |
| 24 #include "content/public/common/common_param_traits.h" | 25 #include "content/public/common/common_param_traits.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 IPC_STRUCT_TRAITS_MEMBER(anchor) | 100 IPC_STRUCT_TRAITS_MEMBER(anchor) |
| 100 IPC_STRUCT_TRAITS_MEMBER(relative_pointer_speed_in_pixels_s) | 101 IPC_STRUCT_TRAITS_MEMBER(relative_pointer_speed_in_pixels_s) |
| 101 IPC_STRUCT_TRAITS_END() | 102 IPC_STRUCT_TRAITS_END() |
| 102 | 103 |
| 103 IPC_STRUCT_TRAITS_BEGIN(content::SyntheticTapGestureParams) | 104 IPC_STRUCT_TRAITS_BEGIN(content::SyntheticTapGestureParams) |
| 104 IPC_STRUCT_TRAITS_PARENT(content::SyntheticGestureParams) | 105 IPC_STRUCT_TRAITS_PARENT(content::SyntheticGestureParams) |
| 105 IPC_STRUCT_TRAITS_MEMBER(position) | 106 IPC_STRUCT_TRAITS_MEMBER(position) |
| 106 IPC_STRUCT_TRAITS_MEMBER(duration_ms) | 107 IPC_STRUCT_TRAITS_MEMBER(duration_ms) |
| 107 IPC_STRUCT_TRAITS_END() | 108 IPC_STRUCT_TRAITS_END() |
| 108 | 109 |
| 109 IPC_STRUCT_BEGIN(InputHostMsg_HandleInputEvent_ACK_Params) | 110 IPC_STRUCT_TRAITS_BEGIN(content::InputEventAck) |
| 110 IPC_STRUCT_MEMBER(blink::WebInputEvent::Type, type) | 111 IPC_STRUCT_TRAITS_MEMBER(type) |
| 111 IPC_STRUCT_MEMBER(content::InputEventAckState, state) | 112 IPC_STRUCT_TRAITS_MEMBER(state) |
| 112 IPC_STRUCT_MEMBER(ui::LatencyInfo, latency) | 113 IPC_STRUCT_TRAITS_MEMBER(latency) |
| 113 // TODO(jdduke): Use Optional<T> type to avoid heap alloc, crbug.com/375002. | 114 IPC_STRUCT_TRAITS_MEMBER(overscroll) |
| 114 IPC_STRUCT_MEMBER(scoped_ptr<content::DidOverscrollParams>, overscroll) | 115 IPC_STRUCT_TRAITS_MEMBER(unique_touch_event_id) |
| 115 IPC_STRUCT_END() | 116 IPC_STRUCT_TRAITS_END() |
| 116 | 117 |
| 117 // Sends an input event to the render widget. | 118 // Sends an input event to the render widget. |
| 118 IPC_MESSAGE_ROUTED3(InputMsg_HandleInputEvent, | 119 IPC_MESSAGE_ROUTED3(InputMsg_HandleInputEvent, |
| 119 IPC::WebInputEventPointer /* event */, | 120 IPC::WebInputEventPointer /* event */, |
| 120 ui::LatencyInfo /* latency_info */, | 121 ui::LatencyInfo /* latency_info */, |
| 121 bool /* is_keyboard_shortcut */) | 122 bool /* is_keyboard_shortcut */) |
| 122 | 123 |
| 123 // Sends the cursor visibility state to the render widget. | 124 // Sends the cursor visibility state to the render widget. |
| 124 IPC_MESSAGE_ROUTED1(InputMsg_CursorVisibilityChange, | 125 IPC_MESSAGE_ROUTED1(InputMsg_CursorVisibilityChange, |
| 125 bool /* is_visible */) | 126 bool /* is_visible */) |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 float /* x */, | 232 float /* x */, |
| 232 float /* y */) | 233 float /* y */) |
| 233 #endif | 234 #endif |
| 234 | 235 |
| 235 IPC_MESSAGE_ROUTED0(InputMsg_SyntheticGestureCompleted) | 236 IPC_MESSAGE_ROUTED0(InputMsg_SyntheticGestureCompleted) |
| 236 | 237 |
| 237 // ----------------------------------------------------------------------------- | 238 // ----------------------------------------------------------------------------- |
| 238 // Messages sent from the renderer to the browser. | 239 // Messages sent from the renderer to the browser. |
| 239 | 240 |
| 240 // Acknowledges receipt of a InputMsg_HandleInputEvent message. | 241 // Acknowledges receipt of a InputMsg_HandleInputEvent message. |
| 241 IPC_MESSAGE_ROUTED1(InputHostMsg_HandleInputEvent_ACK, | 242 IPC_MESSAGE_ROUTED1(InputHostMsg_HandleInputEvent_ACK, content::InputEventAck) |
| 242 InputHostMsg_HandleInputEvent_ACK_Params) | |
| 243 | 243 |
| 244 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, | 244 IPC_MESSAGE_ROUTED1(InputHostMsg_QueueSyntheticGesture, |
| 245 content::SyntheticGesturePacket) | 245 content::SyntheticGesturePacket) |
| 246 | 246 |
| 247 // Notifies the allowed touch actions for a new touch point. | 247 // Notifies the allowed touch actions for a new touch point. |
| 248 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, | 248 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, |
| 249 content::TouchAction /* touch_action */) | 249 content::TouchAction /* touch_action */) |
| 250 | 250 |
| 251 // Sent by the compositor when input scroll events are dropped due to bounds | 251 // Sent by the compositor when input scroll events are dropped due to bounds |
| 252 // restrictions on the root scroll offset. | 252 // restrictions on the root scroll offset. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 271 // This IPC message sends the character bounds after every composition change | 271 // This IPC message sends the character bounds after every composition change |
| 272 // to always have correct bound info. | 272 // to always have correct bound info. |
| 273 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, | 273 IPC_MESSAGE_ROUTED2(InputHostMsg_ImeCompositionRangeChanged, |
| 274 gfx::Range /* composition range */, | 274 gfx::Range /* composition range */, |
| 275 std::vector<gfx::Rect> /* character bounds */) | 275 std::vector<gfx::Rect> /* character bounds */) |
| 276 | 276 |
| 277 // Adding a new message? Stick to the sort order above: first platform | 277 // Adding a new message? Stick to the sort order above: first platform |
| 278 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 278 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
| 279 // platform independent InputHostMsg, then ifdefs for platform specific | 279 // platform independent InputHostMsg, then ifdefs for platform specific |
| 280 // InputHostMsg. | 280 // InputHostMsg. |
| OLD | NEW |