| 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 "cc/scrollbar_animation_controller_linear_fade.h" | 5 #include "cc/animation/scrollbar_animation_controller_linear_fade.h" |
| 6 | 6 |
| 7 #include "base/time.h" | 7 #include "base/time.h" |
| 8 #include "cc/layer_impl.h" | 8 #include "cc/layer_impl.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 | 11 |
| 12 scoped_ptr<ScrollbarAnimationControllerLinearFade> ScrollbarAnimationControllerL
inearFade::create(LayerImpl* scrollLayer, base::TimeDelta fadeoutDelay, base::Ti
meDelta fadeoutLength) | 12 scoped_ptr<ScrollbarAnimationControllerLinearFade> ScrollbarAnimationControllerL
inearFade::create(LayerImpl* scrollLayer, base::TimeDelta fadeoutDelay, base::Ti
meDelta fadeoutLength) |
| 13 { | 13 { |
| 14 return make_scoped_ptr(new ScrollbarAnimationControllerLinearFade(scrollLaye
r, fadeoutDelay, fadeoutLength)); | 14 return make_scoped_ptr(new ScrollbarAnimationControllerLinearFade(scrollLaye
r, fadeoutDelay, fadeoutLength)); |
| 15 } | 15 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 base::TimeDelta delta = now - m_lastAwakenTime; | 85 base::TimeDelta delta = now - m_lastAwakenTime; |
| 86 | 86 |
| 87 if (delta <= m_fadeoutDelay) | 87 if (delta <= m_fadeoutDelay) |
| 88 return 1; | 88 return 1; |
| 89 if (delta < m_fadeoutDelay + m_fadeoutLength) | 89 if (delta < m_fadeoutDelay + m_fadeoutLength) |
| 90 return (m_fadeoutDelay + m_fadeoutLength - delta).InSecondsF() / m_fadeo
utLength.InSecondsF(); | 90 return (m_fadeoutDelay + m_fadeoutLength - delta).InSecondsF() / m_fadeo
utLength.InSecondsF(); |
| 91 return 0; | 91 return 0; |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace cc | 94 } // namespace cc |
| OLD | NEW |