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" | |
6 | |
7 #include "cc/scrollbar_animation_controller.h" | 5 #include "cc/scrollbar_animation_controller.h" |
8 | 6 |
| 7 #include "base/time.h" |
| 8 #include "build/build_config.h" |
9 #include "cc/scrollbar_layer_impl.h" | 9 #include "cc/scrollbar_layer_impl.h" |
10 #include "base/time.h" | |
11 | 10 |
12 #if OS(ANDROID) | 11 #if defined(OS_ANDROID) |
13 #include "cc/scrollbar_animation_controller_linear_fade.h" | 12 #include "cc/scrollbar_animation_controller_linear_fade.h" |
14 #endif | 13 #endif |
15 | 14 |
16 namespace cc { | 15 namespace cc { |
17 | 16 |
18 #if OS(ANDROID) | 17 #if defined(OS_ANDROID) |
19 scoped_ptr<ScrollbarAnimationController> ScrollbarAnimationController::create(La
yerImpl* scrollLayer) | 18 scoped_ptr<ScrollbarAnimationController> ScrollbarAnimationController::create(La
yerImpl* scrollLayer) |
20 { | 19 { |
21 static const double fadeoutDelay = 0.3; | 20 static const double fadeoutDelay = 0.3; |
22 static const double fadeoutLength = 0.3; | 21 static const double fadeoutLength = 0.3; |
23 return ScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeoutDe
lay, fadeoutLength).PassAs<ScrollbarAnimationController>(); | 22 return ScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeoutDe
lay, fadeoutLength).PassAs<ScrollbarAnimationController>(); |
24 } | 23 } |
25 #else | 24 #else |
26 scoped_ptr<ScrollbarAnimationController> ScrollbarAnimationController::create(La
yerImpl* scrollLayer) | 25 scoped_ptr<ScrollbarAnimationController> ScrollbarAnimationController::create(La
yerImpl* scrollLayer) |
27 { | 26 { |
28 return make_scoped_ptr(new ScrollbarAnimationController(scrollLayer)); | 27 return make_scoped_ptr(new ScrollbarAnimationController(scrollLayer)); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 87 } |
89 | 88 |
90 if (m_verticalScrollbarLayer) { | 89 if (m_verticalScrollbarLayer) { |
91 m_verticalScrollbarLayer->setCurrentPos(m_currentOffset.y()); | 90 m_verticalScrollbarLayer->setCurrentPos(m_currentOffset.y()); |
92 m_verticalScrollbarLayer->setTotalSize(m_totalSize.height()); | 91 m_verticalScrollbarLayer->setTotalSize(m_totalSize.height()); |
93 m_verticalScrollbarLayer->setMaximum(m_maximum.y()); | 92 m_verticalScrollbarLayer->setMaximum(m_maximum.y()); |
94 } | 93 } |
95 } | 94 } |
96 | 95 |
97 } // namespace cc | 96 } // namespace cc |
OLD | NEW |