diff options
author | dtapuska <dtapuska@chromium.org> | 2015-05-08 12:29:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-08 19:30:23 +0000 |
commit | a98ac8d7b972c2ca598391e550bef58e2d537684 (patch) | |
tree | 2d7db6e533357005f5fdaddf87211a4102028d47 /content/common/input | |
parent | 3c886914564272a18c217ca4632c3b30f8c74b23 (diff) | |
download | chromium_src-a98ac8d7b972c2ca598391e550bef58e2d537684.zip chromium_src-a98ac8d7b972c2ca598391e550bef58e2d537684.tar.gz chromium_src-a98ac8d7b972c2ca598391e550bef58e2d537684.tar.bz2 |
Implement direction-specific touch-action values.
Add PanLeft, PanRight, PanUp and PanDown support by generalizing the PanX and PanY code.
The fix for the bug is a 3 part change and is required
because of the dependencies of blink as there is a static
cast (causing a ABI dependency). To work around this ABI
problem this is part 1 adding the PanXXX definitions to the
content classes and disabling the static assertions and
casting. The second change is
https://codereview.chromium.org/1137483003/. Once that
change has landed a follow up change to this change one
will remove the #if 0 and re-add the static cast between
blink::WebTouchAction and content::TouchAction
BUG=476556
TEST=content_unittests
Review URL: https://codereview.chromium.org/1131093002
Cr-Commit-Position: refs/heads/master@{#329011}
Diffstat (limited to 'content/common/input')
-rw-r--r-- | content/common/input/touch_action.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/content/common/input/touch_action.h b/content/common/input/touch_action.h index 5eb09f9..89f000d 100644 --- a/content/common/input/touch_action.h +++ b/content/common/input/touch_action.h @@ -17,17 +17,25 @@ enum TouchAction { // No scrolling or zooming allowed. TOUCH_ACTION_NONE = 1 << 0, - TOUCH_ACTION_PAN_X = 1 << 1, + TOUCH_ACTION_PAN_LEFT = 1 << 1, - TOUCH_ACTION_PAN_Y = 1 << 2, + TOUCH_ACTION_PAN_RIGHT = 1 << 2, + + TOUCH_ACTION_PAN_X = TOUCH_ACTION_PAN_LEFT | TOUCH_ACTION_PAN_RIGHT, + + TOUCH_ACTION_PAN_UP = 1 << 3, + + TOUCH_ACTION_PAN_DOWN = 1 << 4, + + TOUCH_ACTION_PAN_Y = TOUCH_ACTION_PAN_UP | TOUCH_ACTION_PAN_DOWN, TOUCH_ACTION_PAN_X_Y = TOUCH_ACTION_PAN_X | TOUCH_ACTION_PAN_Y, - TOUCH_ACTION_PINCH_ZOOM = 1 << 3, + TOUCH_ACTION_PINCH_ZOOM = 1 << 5, TOUCH_ACTION_MANIPULATION = TOUCH_ACTION_PAN_X_Y | TOUCH_ACTION_PINCH_ZOOM, - TOUCH_ACTION_MAX = (1 << 4) - 1 + TOUCH_ACTION_MAX = (1 << 6) - 1 }; } // namespace content |