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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/input/touch_action.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/input_messages.h
diff --git a/content/common/input_messages.h b/content/common/input_messages.h
index 80b0536d05494f55f689d66c91c32a5f4dd7e5c4..38d658d41c5bb92c07d22673d7edc2a7a38a4e57 100644
--- a/content/common/input_messages.h
+++ b/content/common/input_messages.h
@@ -43,8 +43,13 @@ IPC_ENUM_TRAITS_MAX_VALUE(
IPC_ENUM_TRAITS_MAX_VALUE(
content::SyntheticGestureParams::GestureType,
content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX)
-IPC_ENUM_TRAITS_MAX_VALUE(content::TouchAction,
- content::TOUCH_ACTION_MAX)
+IPC_ENUM_TRAITS_VALIDATE(content::TouchAction, (
+ value >= 0 &&
+ value <= content::TOUCH_ACTION_MAX &&
+ (!(value & content::TOUCH_ACTION_NONE) ||
+ (value == content::TOUCH_ACTION_NONE)) &&
+ (!(value & content::TOUCH_ACTION_PINCH_ZOOM) ||
+ (value == content::TOUCH_ACTION_MANIPULATION))))
IPC_STRUCT_TRAITS_BEGIN(content::EditCommand)
IPC_STRUCT_TRAITS_MEMBER(name)
« 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