OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CC_INPUT_INPUT_HANDLER_H_ | 5 #ifndef CC_INPUT_INPUT_HANDLER_H_ |
6 #define CC_INPUT_INPUT_HANDLER_H_ | 6 #define CC_INPUT_INPUT_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 class Point; | 14 class Point; |
14 class PointF; | 15 class PointF; |
15 class Vector2d; | 16 class Vector2d; |
16 class Vector2dF; | 17 class Vector2dF; |
17 } | 18 } |
18 | 19 |
19 namespace cc { | 20 namespace cc { |
20 | 21 |
(...skipping 23 matching lines...) Expand all Loading... |
44 // should be in viewport (logical pixel) coordinates. Otherwise they are in | 45 // should be in viewport (logical pixel) coordinates. Otherwise they are in |
45 // scrolling layer's (logical pixel) space. If there is no room to move the | 46 // scrolling layer's (logical pixel) space. If there is no room to move the |
46 // layer in the requested direction, its first ancestor layer that can be | 47 // layer in the requested direction, its first ancestor layer that can be |
47 // scrolled will be moved instead. If no layer can be moved in the requested | 48 // scrolled will be moved instead. If no layer can be moved in the requested |
48 // direction at all, then false is returned. If any layer is moved, then | 49 // direction at all, then false is returned. If any layer is moved, then |
49 // true is returned. | 50 // true is returned. |
50 // Should only be called if ScrollBegin() returned ScrollStarted. | 51 // Should only be called if ScrollBegin() returned ScrollStarted. |
51 virtual bool ScrollBy(gfx::Point viewport_point, | 52 virtual bool ScrollBy(gfx::Point viewport_point, |
52 gfx::Vector2dF scroll_delta) = 0; | 53 gfx::Vector2dF scroll_delta) = 0; |
53 | 54 |
| 55 virtual bool ScrollVerticallyByPage( |
| 56 gfx::Point viewport_point, |
| 57 WebKit::WebScrollbar::ScrollDirection direction) = 0; |
| 58 |
54 // Stop scrolling the selected layer. Should only be called if ScrollBegin() | 59 // Stop scrolling the selected layer. Should only be called if ScrollBegin() |
55 // returned ScrollStarted. | 60 // returned ScrollStarted. |
56 virtual void ScrollEnd() = 0; | 61 virtual void ScrollEnd() = 0; |
57 | 62 |
58 virtual void PinchGestureBegin() = 0; | 63 virtual void PinchGestureBegin() = 0; |
59 virtual void PinchGestureUpdate(float magnify_delta, gfx::Point anchor) = 0; | 64 virtual void PinchGestureUpdate(float magnify_delta, gfx::Point anchor) = 0; |
60 virtual void PinchGestureEnd() = 0; | 65 virtual void PinchGestureEnd() = 0; |
61 | 66 |
62 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, | 67 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, |
63 bool anchor_point, | 68 bool anchor_point, |
(...skipping 25 matching lines...) Expand all Loading... |
89 protected: | 94 protected: |
90 InputHandler() {} | 95 InputHandler() {} |
91 | 96 |
92 private: | 97 private: |
93 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 98 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
94 }; | 99 }; |
95 | 100 |
96 } // namespace cc | 101 } // namespace cc |
97 | 102 |
98 #endif // CC_INPUT_INPUT_HANDLER_H_ | 103 #endif // CC_INPUT_INPUT_HANDLER_H_ |
OLD | NEW |