OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOP_CONTROLS_MANAGER_H_ | 5 #ifndef CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
6 #define CC_INPUT_TOP_CONTROLS_MANAGER_H_ | 6 #define CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); | 56 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); |
57 | 57 |
58 protected: | 58 protected: |
59 TopControlsManager(TopControlsManagerClient* client, | 59 TopControlsManager(TopControlsManagerClient* client, |
60 float top_controls_height, | 60 float top_controls_height, |
61 float top_controls_show_threshold, | 61 float top_controls_show_threshold, |
62 float top_controls_hide_threshold); | 62 float top_controls_hide_threshold); |
63 | 63 |
64 private: | 64 private: |
65 void SetControlsTopOffset(float); | 65 void SetControlsTopOffset(float offset); |
66 void ResetAnimations(); | 66 void ResetAnimations(); |
67 void SetupAnimation(AnimationDirection direction); | 67 void SetupAnimation(AnimationDirection direction); |
68 void StartAnimationIfNecessary(); | 68 void StartAnimationIfNecessary(); |
69 bool IsAnimationCompleteAtTime(base::TimeTicks time); | 69 bool IsAnimationCompleteAtTime(base::TimeTicks time); |
70 | 70 |
71 TopControlsManagerClient* client_; // The client manages the lifecycle of | 71 TopControlsManagerClient* client_; // The client manages the lifecycle of |
72 // this. | 72 // this. |
73 | 73 |
74 scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_; | 74 scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_; |
75 AnimationDirection animation_direction_; | 75 AnimationDirection animation_direction_; |
(...skipping 11 matching lines...) Expand all Loading... |
87 // The height of the visible top control such that it must be hidden when | 87 // The height of the visible top control such that it must be hidden when |
88 // the user stops the scroll. | 88 // the user stops the scroll. |
89 float top_controls_hide_height_; | 89 float top_controls_hide_height_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); | 91 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace cc | 94 } // namespace cc |
95 | 95 |
96 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ | 96 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
OLD | NEW |