| 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 "FloatPoint.h" | 9 #include "FloatPoint.h" |
| 9 #include "IntSize.h" | 10 #include "IntSize.h" |
| 10 #include <wtf/PassOwnPtr.h> | |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 | 13 |
| 14 class CCLayerImpl; | 14 class CCLayerImpl; |
| 15 class CCScrollbarLayerImpl; | 15 class CCScrollbarLayerImpl; |
| 16 | 16 |
| 17 // This abstract class represents the compositor-side analogy of ScrollbarAnimat
or. | 17 // This abstract class represents the compositor-side analogy of ScrollbarAnimat
or. |
| 18 // Individual platforms should subclass it to provide specialized implementation
. | 18 // Individual platforms should subclass it to provide specialized implementation
. |
| 19 class CCScrollbarAnimationController { | 19 class CCScrollbarAnimationController { |
| 20 public: | 20 public: |
| 21 // Implemented by subclass. | 21 static scoped_ptr<CCScrollbarAnimationController> create(CCLayerImpl* scroll
Layer); |
| 22 static PassOwnPtr<CCScrollbarAnimationController> create(CCLayerImpl* scroll
Layer); | |
| 23 | 22 |
| 24 virtual ~CCScrollbarAnimationController(); | 23 virtual ~CCScrollbarAnimationController(); |
| 25 | 24 |
| 26 virtual bool animate(double monotonicTime); | 25 virtual bool animate(double monotonicTime); |
| 27 void didPinchGestureBegin(); | 26 void didPinchGestureBegin(); |
| 28 void didPinchGestureUpdate(); | 27 void didPinchGestureUpdate(); |
| 29 void didPinchGestureEnd(); | 28 void didPinchGestureEnd(); |
| 30 void updateScrollOffset(CCLayerImpl* scrollLayer); | 29 void updateScrollOffset(CCLayerImpl* scrollLayer); |
| 31 | 30 |
| 32 void setHorizontalScrollbarLayer(CCScrollbarLayerImpl* layer) { m_horizontal
ScrollbarLayer = layer; } | 31 void setHorizontalScrollbarLayer(CCScrollbarLayerImpl* layer) { m_horizontal
ScrollbarLayer = layer; } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 55 CCScrollbarLayerImpl* m_verticalScrollbarLayer; | 54 CCScrollbarLayerImpl* m_verticalScrollbarLayer; |
| 56 | 55 |
| 57 FloatPoint m_currentPos; | 56 FloatPoint m_currentPos; |
| 58 IntSize m_totalSize; | 57 IntSize m_totalSize; |
| 59 IntSize m_maximum; | 58 IntSize m_maximum; |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 } // namespace cc | 61 } // namespace cc |
| 63 | 62 |
| 64 #endif // CCScrollbarAnimationController_h | 63 #endif // CCScrollbarAnimationController_h |
| OLD | NEW |