Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: content/common/input_messages.h

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks from sadrul/jdduke CR Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_pinch_gesture_params.h" 16 #include "content/common/input/synthetic_pinch_gesture_params.h"
17 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" 17 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
18 #include "content/port/common/input_event_ack_state.h" 18 #include "content/port/common/input_event_ack_state.h"
19 #include "content/public/common/common_param_traits.h" 19 #include "content/public/common/common_param_traits.h"
20 #include "content/common/input/touch_action.h"
20 #include "ipc/ipc_message_macros.h" 21 #include "ipc/ipc_message_macros.h"
21 #include "third_party/WebKit/public/web/WebInputEvent.h" 22 #include "third_party/WebKit/public/web/WebInputEvent.h"
22 #include "ui/events/latency_info.h" 23 #include "ui/events/latency_info.h"
23 #include "ui/gfx/point.h" 24 #include "ui/gfx/point.h"
24 #include "ui/gfx/rect.h" 25 #include "ui/gfx/rect.h"
25 26
26 #undef IPC_MESSAGE_EXPORT 27 #undef IPC_MESSAGE_EXPORT
27 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 28 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
28 29
29 #ifdef IPC_MESSAGE_START 30 #ifdef IPC_MESSAGE_START
30 #error IPC_MESSAGE_START 31 #error IPC_MESSAGE_START
31 #endif 32 #endif
32 33
33 #define IPC_MESSAGE_START InputMsgStart 34 #define IPC_MESSAGE_START InputMsgStart
34 35
35 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, 36 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState,
36 content::INPUT_EVENT_ACK_STATE_MAX) 37 content::INPUT_EVENT_ACK_STATE_MAX)
37 IPC_ENUM_TRAITS_MAX_VALUE( 38 IPC_ENUM_TRAITS_MAX_VALUE(
38 content::SyntheticGestureParams::GestureSourceType, 39 content::SyntheticGestureParams::GestureSourceType,
39 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) 40 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX)
40 IPC_ENUM_TRAITS_MAX_VALUE( 41 IPC_ENUM_TRAITS_MAX_VALUE(
41 content::SyntheticGestureParams::GestureType, 42 content::SyntheticGestureParams::GestureType,
42 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) 43 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX)
44 IPC_ENUM_TRAITS_MAX_VALUE(content::TouchAction,
45 content::TOUCH_ACTION_MAX)
43 46
44 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) 47 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand)
45 IPC_STRUCT_TRAITS_MEMBER(name) 48 IPC_STRUCT_TRAITS_MEMBER(name)
46 IPC_STRUCT_TRAITS_MEMBER(value) 49 IPC_STRUCT_TRAITS_MEMBER(value)
47 IPC_STRUCT_TRAITS_END() 50 IPC_STRUCT_TRAITS_END()
48 51
49 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) 52 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent)
50 IPC_STRUCT_TRAITS_MEMBER(web_event) 53 IPC_STRUCT_TRAITS_MEMBER(web_event)
51 IPC_STRUCT_TRAITS_MEMBER(latency_info) 54 IPC_STRUCT_TRAITS_MEMBER(latency_info)
52 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) 55 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 164
162 // ----------------------------------------------------------------------------- 165 // -----------------------------------------------------------------------------
163 // Messages sent from the renderer to the browser. 166 // Messages sent from the renderer to the browser.
164 167
165 // Acknowledges receipt of a InputMsg_HandleInputEvent message. 168 // Acknowledges receipt of a InputMsg_HandleInputEvent message.
166 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, 169 IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK,
167 blink::WebInputEvent::Type, 170 blink::WebInputEvent::Type,
168 content::InputEventAckState /* ack_result */, 171 content::InputEventAckState /* ack_result */,
169 ui::LatencyInfo /* latency_info */) 172 ui::LatencyInfo /* latency_info */)
170 173
174 // Notifies the allowed touch actions for a new touch point.
175 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction,
176 content::TouchAction /* touch_action */)
171 177
172 // Adding a new message? Stick to the sort order above: first platform 178 // Adding a new message? Stick to the sort order above: first platform
173 // independent InputMsg, then ifdefs for platform specific InputMsg, then 179 // independent InputMsg, then ifdefs for platform specific InputMsg, then
174 // platform independent InputHostMsg, then ifdefs for platform specific 180 // platform independent InputHostMsg, then ifdefs for platform specific
175 // InputHostMsg. 181 // InputHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698