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

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

Issue 197273003: Add support for touch-action: manipulation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move validation to IPC layer Created 6 years, 9 months 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
« no previous file with comments | « content/common/input/touch_action.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 25 matching lines...) Expand all
36 #define IPC_MESSAGE_START InputMsgStart 36 #define IPC_MESSAGE_START InputMsgStart
37 37
38 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState, 38 IPC_ENUM_TRAITS_MAX_VALUE(content::InputEventAckState,
39 content::INPUT_EVENT_ACK_STATE_MAX) 39 content::INPUT_EVENT_ACK_STATE_MAX)
40 IPC_ENUM_TRAITS_MAX_VALUE( 40 IPC_ENUM_TRAITS_MAX_VALUE(
41 content::SyntheticGestureParams::GestureSourceType, 41 content::SyntheticGestureParams::GestureSourceType,
42 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX) 42 content::SyntheticGestureParams::GESTURE_SOURCE_TYPE_MAX)
43 IPC_ENUM_TRAITS_MAX_VALUE( 43 IPC_ENUM_TRAITS_MAX_VALUE(
44 content::SyntheticGestureParams::GestureType, 44 content::SyntheticGestureParams::GestureType,
45 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX) 45 content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX)
46 IPC_ENUM_TRAITS_MAX_VALUE(content::TouchAction, 46 IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, (
47 content::TOUCH_ACTION_MAX) 47 value >= 0 &&
48 value <= content::TOUCH_ACTION_MAX &&
49 (!(value & content::TOUCH_ACTION_NONE) ||
50 (value == content::TOUCH_ACTION_NONE)) &&
51 (!(value & content::TOUCH_ACTION_PINCH_ZOOM) ||
52 (value == content::TOUCH_ACTION_MANIPULATION))))
48 53
49 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand) 54 IPC_STRUCT_TRAITS_BEGIN(content::EditCommand)
50 IPC_STRUCT_TRAITS_MEMBER(name) 55 IPC_STRUCT_TRAITS_MEMBER(name)
51 IPC_STRUCT_TRAITS_MEMBER(value) 56 IPC_STRUCT_TRAITS_MEMBER(value)
52 IPC_STRUCT_TRAITS_END() 57 IPC_STRUCT_TRAITS_END()
53 58
54 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent) 59 IPC_STRUCT_TRAITS_BEGIN(content::InputEvent)
55 IPC_STRUCT_TRAITS_MEMBER(web_event) 60 IPC_STRUCT_TRAITS_MEMBER(web_event)
56 IPC_STRUCT_TRAITS_MEMBER(latency_info) 61 IPC_STRUCT_TRAITS_MEMBER(latency_info)
57 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut) 62 IPC_STRUCT_TRAITS_MEMBER(is_keyboard_shortcut)
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 content::SyntheticGesturePacket) 191 content::SyntheticGesturePacket)
187 192
188 // Notifies the allowed touch actions for a new touch point. 193 // Notifies the allowed touch actions for a new touch point.
189 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction, 194 IPC_MESSAGE_ROUTED1(InputHostMsg_SetTouchAction,
190 content::TouchAction /* touch_action */) 195 content::TouchAction /* touch_action */)
191 196
192 // Adding a new message? Stick to the sort order above: first platform 197 // Adding a new message? Stick to the sort order above: first platform
193 // independent InputMsg, then ifdefs for platform specific InputMsg, then 198 // independent InputMsg, then ifdefs for platform specific InputMsg, then
194 // platform independent InputHostMsg, then ifdefs for platform specific 199 // platform independent InputHostMsg, then ifdefs for platform specific
195 // InputHostMsg. 200 // InputHostMsg.
OLDNEW
« no previous file with comments | « content/common/input/touch_action.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698