Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_RENDERER_HOST_INPUT_TOUCH_HANDLE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_HANDLE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_HANDLE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_HANDLE_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "ui/events/gesture_detection/motion_event.h" | 12 #include "ui/events/gesture_detection/motion_event.h" |
| 13 #include "ui/gfx/geometry/point_f.h" | 13 #include "ui/gfx/geometry/point_f.h" |
| 14 #include "ui/gfx/geometry/rect_f.h" | 14 #include "ui/gfx/geometry/rect_f.h" |
| 15 #include "ui/gfx/geometry/vector2d_f.h" | 15 #include "ui/gfx/geometry/vector2d_f.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class TouchHandle; | 19 class TouchHandle; |
| 20 | 20 |
| 21 enum TouchHandleOrientation { | 21 enum TouchHandleOrientation { |
| 22 TOUCH_HANDLE_LEFT, | 22 TOUCH_HANDLE_LEFT, |
| 23 TOUCH_HANDLE_CENTER, | 23 TOUCH_HANDLE_CENTER, |
| 24 TOUCH_HANDLE_RIGHT, | 24 TOUCH_HANDLE_RIGHT, |
| 25 TOUCH_HANDLE_LEFT_INVERTED, | |
|
jdduke (slow)
2014/08/20 15:15:01
I don't think we should add these until we actuall
| |
| 26 TOUCH_HANDLE_RIGHT_INVERTED, | |
| 27 TOUCH_HANDLE_LEFT_FLIPPED, | |
| 28 TOUCH_HANDLE_RIGHT_FLIPPED, | |
| 29 TOUCH_HANDLE_LEFT_FLIPPED_INVERTED, | |
| 30 TOUCH_HANDLE_RIGHT_FLIPPED_INVERTED, | |
| 31 TOUCH_HANDLE_CENTER_INVERTED, | |
| 25 TOUCH_HANDLE_ORIENTATION_UNDEFINED, | 32 TOUCH_HANDLE_ORIENTATION_UNDEFINED, |
| 26 }; | 33 }; |
| 27 | 34 |
| 28 // Interface through which |TouchHandle| delegates rendering-specific duties. | 35 // Interface through which |TouchHandle| delegates rendering-specific duties. |
| 29 class CONTENT_EXPORT TouchHandleDrawable { | 36 class CONTENT_EXPORT TouchHandleDrawable { |
| 30 public: | 37 public: |
| 31 virtual ~TouchHandleDrawable() {} | 38 virtual ~TouchHandleDrawable() {} |
| 32 virtual void SetEnabled(bool enabled) = 0; | 39 virtual void SetEnabled(bool enabled) = 0; |
| 33 virtual void SetOrientation(TouchHandleOrientation orientation) = 0; | 40 virtual void SetOrientation(TouchHandleOrientation orientation) = 0; |
| 34 virtual void SetAlpha(float alpha) = 0; | 41 virtual void SetAlpha(float alpha) = 0; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 bool enabled_; | 130 bool enabled_; |
| 124 bool is_visible_; | 131 bool is_visible_; |
| 125 bool is_dragging_; | 132 bool is_dragging_; |
| 126 | 133 |
| 127 DISALLOW_COPY_AND_ASSIGN(TouchHandle); | 134 DISALLOW_COPY_AND_ASSIGN(TouchHandle); |
| 128 }; | 135 }; |
| 129 | 136 |
| 130 } // namespace content | 137 } // namespace content |
| 131 | 138 |
| 132 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_HANDLE_H_ | 139 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_HANDLE_H_ |
| OLD | NEW |