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

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

Issue 18120002: Use a direct include of time headers in cc/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « cc/animation/scrollbar_animation_controller.h ('k') | cc/debug/frame_rate_counter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/time.h"
8 #include "cc/layers/layer_impl.h" 8 #include "cc/layers/layer_impl.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 scoped_ptr<ScrollbarAnimationControllerLinearFade> 12 scoped_ptr<ScrollbarAnimationControllerLinearFade>
13 ScrollbarAnimationControllerLinearFade::Create(LayerImpl* scroll_layer, 13 ScrollbarAnimationControllerLinearFade::Create(LayerImpl* scroll_layer,
14 base::TimeDelta fadeout_delay, 14 base::TimeDelta fadeout_delay,
15 base::TimeDelta fadeout_length) { 15 base::TimeDelta fadeout_length) {
16 return make_scoped_ptr(new ScrollbarAnimationControllerLinearFade( 16 return make_scoped_ptr(new ScrollbarAnimationControllerLinearFade(
17 scroll_layer, fadeout_delay, fadeout_length)); 17 scroll_layer, fadeout_delay, fadeout_length));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (delta <= fadeout_delay_) 86 if (delta <= fadeout_delay_)
87 return 1.0f; 87 return 1.0f;
88 if (delta < fadeout_delay_ + fadeout_length_) { 88 if (delta < fadeout_delay_ + fadeout_length_) {
89 return (fadeout_delay_ + fadeout_length_ - delta).InSecondsF() / 89 return (fadeout_delay_ + fadeout_length_ - delta).InSecondsF() /
90 fadeout_length_.InSecondsF(); 90 fadeout_length_.InSecondsF();
91 } 91 }
92 return 0.0f; 92 return 0.0f;
93 } 93 }
94 94
95 } // namespace cc 95 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/scrollbar_animation_controller.h ('k') | cc/debug/frame_rate_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698