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 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCScrollbarAnimationController.h" | 7 #include "CCScrollbarAnimationController.h" |
8 | 8 |
9 #include "CCScrollbarLayerImpl.h" | 9 #include "CCScrollbarLayerImpl.h" |
10 #include <wtf/CurrentTime.h> | 10 #include <wtf/CurrentTime.h> |
11 | 11 |
12 #if OS(ANDROID) | 12 #if OS(ANDROID) |
13 #include "CCScrollbarAnimationControllerLinearFade.h" | 13 #include "CCScrollbarAnimationControllerLinearFade.h" |
14 #endif | 14 #endif |
15 | 15 |
16 namespace WebCore { | 16 namespace cc { |
17 | 17 |
18 #if OS(ANDROID) | 18 #if OS(ANDROID) |
19 PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat
e(CCLayerImpl* scrollLayer) | 19 PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat
e(CCLayerImpl* scrollLayer) |
20 { | 20 { |
21 static const double fadeoutDelay = 0.3; | 21 static const double fadeoutDelay = 0.3; |
22 static const double fadeoutLength = 0.3; | 22 static const double fadeoutLength = 0.3; |
23 return CCScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeout
Delay, fadeoutLength); | 23 return CCScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeout
Delay, fadeoutLength); |
24 } | 24 } |
25 #else | 25 #else |
26 PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat
e(CCLayerImpl* scrollLayer) | 26 PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat
e(CCLayerImpl* scrollLayer) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 m_horizontalScrollbarLayer->setMaximum(m_maximum.width()); | 82 m_horizontalScrollbarLayer->setMaximum(m_maximum.width()); |
83 } | 83 } |
84 | 84 |
85 if (m_verticalScrollbarLayer) { | 85 if (m_verticalScrollbarLayer) { |
86 m_verticalScrollbarLayer->setCurrentPos(m_currentPos.y()); | 86 m_verticalScrollbarLayer->setCurrentPos(m_currentPos.y()); |
87 m_verticalScrollbarLayer->setTotalSize(m_totalSize.height()); | 87 m_verticalScrollbarLayer->setTotalSize(m_totalSize.height()); |
88 m_verticalScrollbarLayer->setMaximum(m_maximum.height()); | 88 m_verticalScrollbarLayer->setMaximum(m_maximum.height()); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 } // namespace WebCore | 92 } // namespace cc |
OLD | NEW |