OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CCScrollbarAnimationController_h | 5 #ifndef CCScrollbarAnimationController_h |
6 #define CCScrollbarAnimationController_h | 6 #define CCScrollbarAnimationController_h |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/cc_export.h" |
9 #include "FloatPoint.h" | 10 #include "FloatPoint.h" |
10 #include "IntSize.h" | 11 #include "IntSize.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 | 14 |
14 class LayerImpl; | 15 class LayerImpl; |
15 class ScrollbarLayerImpl; | 16 class ScrollbarLayerImpl; |
16 | 17 |
17 // This abstract class represents the compositor-side analogy of ScrollbarAnimat
or. | 18 // This abstract class represents the compositor-side analogy of ScrollbarAnimat
or. |
18 // Individual platforms should subclass it to provide specialized implementation
. | 19 // Individual platforms should subclass it to provide specialized implementation
. |
19 class ScrollbarAnimationController { | 20 class CC_EXPORT ScrollbarAnimationController { |
20 public: | 21 public: |
21 static scoped_ptr<ScrollbarAnimationController> create(LayerImpl* scrollLaye
r); | 22 static scoped_ptr<ScrollbarAnimationController> create(LayerImpl* scrollLaye
r); |
22 | 23 |
23 virtual ~ScrollbarAnimationController(); | 24 virtual ~ScrollbarAnimationController(); |
24 | 25 |
25 virtual bool animate(double monotonicTime); | 26 virtual bool animate(double monotonicTime); |
26 void didPinchGestureBegin(); | 27 void didPinchGestureBegin(); |
27 void didPinchGestureUpdate(); | 28 void didPinchGestureUpdate(); |
28 void didPinchGestureEnd(); | 29 void didPinchGestureEnd(); |
29 void updateScrollOffset(LayerImpl* scrollLayer); | 30 void updateScrollOffset(LayerImpl* scrollLayer); |
(...skipping 24 matching lines...) Expand all Loading... |
54 ScrollbarLayerImpl* m_verticalScrollbarLayer; | 55 ScrollbarLayerImpl* m_verticalScrollbarLayer; |
55 | 56 |
56 FloatPoint m_currentPos; | 57 FloatPoint m_currentPos; |
57 IntSize m_totalSize; | 58 IntSize m_totalSize; |
58 IntSize m_maximum; | 59 IntSize m_maximum; |
59 }; | 60 }; |
60 | 61 |
61 } // namespace cc | 62 } // namespace cc |
62 | 63 |
63 #endif // CCScrollbarAnimationController_h | 64 #endif // CCScrollbarAnimationController_h |
OLD | NEW |