OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CONTENT_COMMON_INPUT_TOUCH_ACTION_H_ | 5 #ifndef CONTENT_COMMON_INPUT_TOUCH_ACTION_H_ |
6 #define CONTENT_COMMON_INPUT_TOUCH_ACTION_H_ | 6 #define CONTENT_COMMON_INPUT_TOUCH_ACTION_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 // The current touch action specifies what accelerated browser operations | 10 // The current touch action specifies what accelerated browser operations |
11 // (panning and zooming) are currently permitted via touch input. | 11 // (panning and zooming) are currently permitted via touch input. |
12 // See http://www.w3.org/TR/pointerevents/#the-touch-action-css-property. | 12 // See http://www.w3.org/TR/pointerevents/#the-touch-action-css-property. |
13 enum TouchAction { | 13 enum TouchAction { |
14 // All actions are pemitted (the default). | 14 // All actions are pemitted (the default). |
15 TOUCH_ACTION_AUTO = 0, | 15 TOUCH_ACTION_AUTO = 0, |
16 | 16 |
17 // No scrolling or zooming allowed. | 17 // No scrolling or zooming allowed. |
18 TOUCH_ACTION_NONE = 1 << 0, | 18 TOUCH_ACTION_NONE = 1 << 0, |
19 | 19 |
20 TOUCH_ACTION_PAN_X = 1 << 1, | 20 TOUCH_ACTION_PAN_X = 1 << 1, |
21 | 21 |
22 TOUCH_ACTION_PAN_Y = 1 << 2, | 22 TOUCH_ACTION_PAN_Y = 1 << 2, |
23 | 23 |
24 TOUCH_ACTION_PAN_X_Y = TOUCH_ACTION_PAN_X | TOUCH_ACTION_PAN_Y, | 24 TOUCH_ACTION_PAN_X_Y = TOUCH_ACTION_PAN_X | TOUCH_ACTION_PAN_Y, |
25 | 25 |
26 TOUCH_ACTION_MAX = (1 << 3) - 1 | 26 TOUCH_ACTION_PINCH_ZOOM = 1 << 3, |
| 27 |
| 28 TOUCH_ACTION_MANIPULATION = TOUCH_ACTION_PAN_X_Y | TOUCH_ACTION_PINCH_ZOOM, |
| 29 |
| 30 TOUCH_ACTION_MAX = (1 << 4) - 1 |
27 }; | 31 }; |
28 | 32 |
29 } // namespace content | 33 } // namespace content |
30 | 34 |
31 #endif // CONTENT_COMMON_INPUT_TOUCH_ACTION_H_ | 35 #endif // CONTENT_COMMON_INPUT_TOUCH_ACTION_H_ |
OLD | NEW |