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 gfx { | 13 namespace gfx { |
13 class Size; | 14 class Size; |
14 } | 15 } |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 | 18 |
18 class LayerImpl; | 19 class LayerImpl; |
19 class ScrollbarLayerImpl; | 20 class ScrollbarLayerImpl; |
20 | 21 |
21 // This abstract class represents the compositor-side analogy of ScrollbarAnimat
or. | 22 // This abstract class represents the compositor-side analogy of ScrollbarAnimat
or. |
22 // Individual platforms should subclass it to provide specialized implementation
. | 23 // Individual platforms should subclass it to provide specialized implementation
. |
23 class ScrollbarAnimationController { | 24 class CC_EXPORT ScrollbarAnimationController { |
24 public: | 25 public: |
25 static scoped_ptr<ScrollbarAnimationController> create(LayerImpl* scrollLaye
r); | 26 static scoped_ptr<ScrollbarAnimationController> create(LayerImpl* scrollLaye
r); |
26 | 27 |
27 virtual ~ScrollbarAnimationController(); | 28 virtual ~ScrollbarAnimationController(); |
28 | 29 |
29 virtual bool animate(double monotonicTime); | 30 virtual bool animate(double monotonicTime); |
30 void didPinchGestureBegin(); | 31 void didPinchGestureBegin(); |
31 void didPinchGestureUpdate(); | 32 void didPinchGestureUpdate(); |
32 void didPinchGestureEnd(); | 33 void didPinchGestureEnd(); |
33 void updateScrollOffset(LayerImpl* scrollLayer); | 34 void updateScrollOffset(LayerImpl* scrollLayer); |
(...skipping 24 matching lines...) Expand all Loading... |
58 ScrollbarLayerImpl* m_verticalScrollbarLayer; | 59 ScrollbarLayerImpl* m_verticalScrollbarLayer; |
59 | 60 |
60 FloatPoint m_currentPos; | 61 FloatPoint m_currentPos; |
61 gfx::Size m_totalSize; | 62 gfx::Size m_totalSize; |
62 IntSize m_maximum; | 63 IntSize m_maximum; |
63 }; | 64 }; |
64 | 65 |
65 } // namespace cc | 66 } // namespace cc |
66 | 67 |
67 #endif // CCScrollbarAnimationController_h | 68 #endif // CCScrollbarAnimationController_h |
OLD | NEW |