| 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 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_ | 5 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_ |
| 6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_ | 6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 ScrollbarAnimationControllerLinearFade( | 32 ScrollbarAnimationControllerLinearFade( |
| 33 int scroll_layer_id, | 33 int scroll_layer_id, |
| 34 ScrollbarAnimationControllerClient* client, | 34 ScrollbarAnimationControllerClient* client, |
| 35 base::TimeDelta delay_before_starting, | 35 base::TimeDelta delay_before_starting, |
| 36 base::TimeDelta resize_delay_before_starting, | 36 base::TimeDelta resize_delay_before_starting, |
| 37 base::TimeDelta duration); | 37 base::TimeDelta duration); |
| 38 | 38 |
| 39 void RunAnimationFrame(float progress) override; | 39 void RunAnimationFrame(float progress) override; |
| 40 const base::TimeDelta& Duration() override; |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 float OpacityAtTime(base::TimeTicks now) const; | 43 float OpacityAtTime(base::TimeTicks now) const; |
| 43 void ApplyOpacityToScrollbars(float opacity); | 44 void ApplyOpacityToScrollbars(float opacity); |
| 44 | 45 |
| 46 base::TimeDelta duration_; |
| 47 |
| 45 DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerLinearFade); | 48 DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerLinearFade); |
| 46 }; | 49 }; |
| 47 | 50 |
| 48 } // namespace cc | 51 } // namespace cc |
| 49 | 52 |
| 50 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_ | 53 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_ |
| OLD | NEW |