Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: cc/animation/scrollbar_animation_controller_linear_fade.cc

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/animation/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/layers/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 }
16 16
17 ScrollbarAnimationControllerLinearFade::ScrollbarAnimationControllerLinearFade(L ayerImpl* scrollLayer, base::TimeDelta fadeoutDelay, base::TimeDelta fadeoutLeng th) 17 ScrollbarAnimationControllerLinearFade::ScrollbarAnimationControllerLinearFade(L ayerImpl* scrollLayer, base::TimeDelta fadeoutDelay, base::TimeDelta fadeoutLeng th)
18 : ScrollbarAnimationController() 18 : ScrollbarAnimationController()
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698