| 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_event_disposition.h" | |
| 15 #include "content/common/input/input_param_traits.h" | 14 #include "content/common/input/input_param_traits.h" |
| 16 #include "content/common/input/ipc_input_event_payload.h" | 15 #include "content/common/input/ipc_input_event_payload.h" |
| 17 #include "content/common/input/event_packet.h" | |
| 18 #include "content/port/common/input_event_ack_state.h" | 16 #include "content/port/common/input_event_ack_state.h" |
| 19 #include "content/public/common/common_param_traits.h" | 17 #include "content/public/common/common_param_traits.h" |
| 20 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
| 21 #include "third_party/WebKit/public/web/WebInputEvent.h" | 19 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 22 #include "ui/events/latency_info.h" | 20 #include "ui/events/latency_info.h" |
| 23 #include "ui/gfx/point.h" | 21 #include "ui/gfx/point.h" |
| 24 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
| 25 | 23 |
| 26 #undef IPC_MESSAGE_EXPORT | 24 #undef IPC_MESSAGE_EXPORT |
| 27 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 25 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 28 | 26 |
| 29 #ifdef IPC_MESSAGE_START | 27 #ifdef IPC_MESSAGE_START |
| 30 #error IPC_MESSAGE_START | 28 #error IPC_MESSAGE_START |
| 31 #endif | 29 #endif |
| 32 | 30 |
| 33 #define IPC_MESSAGE_START InputMsgStart | 31 #define IPC_MESSAGE_START InputMsgStart |
| 34 | 32 |
| 35 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEvent::Payload::Type, | 33 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEvent::Payload::Type, |
| 36 content::InputEvent::Payload::PAYLOAD_TYPE_MAX) | 34 content::InputEvent::Payload::PAYLOAD_TYPE_MAX) |
| 37 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, | 35 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, |
| 38 content::INPUT_EVENT_ACK_STATE_MAX) | 36 content::INPUT_EVENT_ACK_STATE_MAX) |
| 39 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventDisposition, | |
| 40 content::INPUT_EVENT_DISPOSITION_MAX) | |
| 41 | 37 |
| 42 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) | 38 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) |
| 43 IPC_STRUCT_TRAITS_MEMBER(name) | 39 IPC_STRUCT_TRAITS_MEMBER(name) |
| 44 IPC_STRUCT_TRAITS_MEMBER(value) | 40 IPC_STRUCT_TRAITS_MEMBER(value) |
| 45 IPC_STRUCT_TRAITS_END() | 41 IPC_STRUCT_TRAITS_END() |
| 46 | 42 |
| 47 IPC_STRUCT_TRAITS_BEGIN(content::IPCInputEventPayload) | 43 IPC_STRUCT_TRAITS_BEGIN(content::IPCInputEventPayload) |
| 48 IPC_STRUCT_TRAITS_MEMBER(message) | 44 IPC_STRUCT_TRAITS_MEMBER(message) |
| 49 IPC_STRUCT_TRAITS_END() | 45 IPC_STRUCT_TRAITS_END() |
| 50 | 46 |
| 51 // Sends an input event to the render widget. | 47 // Sends an input event to the render widget. |
| 52 IPC_MESSAGE_ROUTED3(InputMsg_HandleInputEvent, | 48 IPC_MESSAGE_ROUTED3(InputMsg_HandleInputEvent, |
| 53 IPC::WebInputEventPointer /* event */, | 49 IPC::WebInputEventPointer /* event */, |
| 54 ui::LatencyInfo /* latency_info */, | 50 ui::LatencyInfo /* latency_info */, |
| 55 bool /* is_keyboard_shortcut */) | 51 bool /* is_keyboard_shortcut */) |
| 56 | 52 |
| 57 // Sends an event packet to the render widget. | |
| 58 IPC_MESSAGE_ROUTED2(InputMsg_HandleEventPacket, | |
| 59 content::EventPacket /* event_packet */, | |
| 60 content::InputEventDispositions /* dispositions */) | |
| 61 | |
| 62 // Sends the cursor visibility state to the render widget. | 53 // Sends the cursor visibility state to the render widget. |
| 63 IPC_MESSAGE_ROUTED1(InputMsg_CursorVisibilityChange, | 54 IPC_MESSAGE_ROUTED1(InputMsg_CursorVisibilityChange, |
| 64 bool /* is_visible */) | 55 bool /* is_visible */) |
| 65 | 56 |
| 66 // This message notifies the renderer that the next key event is bound to one | 57 // This message notifies the renderer that the next key event is bound to one |
| 67 // or more pre-defined edit commands. If the next key event is not handled | 58 // or more pre-defined edit commands. If the next key event is not handled |
| 68 // by webkit, the specified edit commands shall be executed against current | 59 // by webkit, the specified edit commands shall be executed against current |
| 69 // focused frame. | 60 // focused frame. |
| 70 // Parameters | 61 // Parameters |
| 71 // * edit_commands (see chrome/common/edit_command_types.h) | 62 // * edit_commands (see chrome/common/edit_command_types.h) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 134 |
| 144 // ----------------------------------------------------------------------------- | 135 // ----------------------------------------------------------------------------- |
| 145 // Messages sent from the renderer to the browser. | 136 // Messages sent from the renderer to the browser. |
| 146 | 137 |
| 147 // Acknowledges receipt of a InputMsg_HandleInputEvent message. | 138 // Acknowledges receipt of a InputMsg_HandleInputEvent message. |
| 148 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, | 139 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, |
| 149 WebKit::WebInputEvent::Type, | 140 WebKit::WebInputEvent::Type, |
| 150 content::InputEventAckState /* ack_result */, | 141 content::InputEventAckState /* ack_result */, |
| 151 ui::LatencyInfo /* latency_info */) | 142 ui::LatencyInfo /* latency_info */) |
| 152 | 143 |
| 153 IPC_MESSAGE_ROUTED2(InputHostMsg_HandleEventPacket_ACK, | |
| 154 int64 /* event_packet_id */, | |
| 155 content::InputEventDispositions /* dispositions */) | |
| 156 | |
| 157 | 144 |
| 158 // Adding a new message? Stick to the sort order above: first platform | 145 // Adding a new message? Stick to the sort order above: first platform |
| 159 // independent InputMsg, then ifdefs for platform specific InputMsg, then | 146 // independent InputMsg, then ifdefs for platform specific InputMsg, then |
| 160 // platform independent InputHostMsg, then ifdefs for platform specific | 147 // platform independent InputHostMsg, then ifdefs for platform specific |
| 161 // InputHostMsg. | 148 // InputHostMsg. |
| OLD | NEW |