| 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/input/top_controls_state.h" | 10 #include "cc/input/top_controls_state.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void MainThreadHasStoppedFlinging(); | 64 void MainThreadHasStoppedFlinging(); |
| 65 | 65 |
| 66 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); | 66 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); |
| 67 | 67 |
| 68 protected: | 68 protected: |
| 69 TopControlsManager(TopControlsManagerClient* client, | 69 TopControlsManager(TopControlsManagerClient* client, |
| 70 float top_controls_show_threshold, | 70 float top_controls_show_threshold, |
| 71 float top_controls_hide_threshold); | 71 float top_controls_hide_threshold); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 bool TopControlsEnabled(); |
| 74 void ResetAnimations(); | 75 void ResetAnimations(); |
| 75 void SetupAnimation(AnimationDirection direction); | 76 void SetupAnimation(AnimationDirection direction); |
| 76 void StartAnimationIfNecessary(); | 77 void StartAnimationIfNecessary(); |
| 77 bool IsAnimationCompleteAtTime(base::TimeTicks time); | 78 bool IsAnimationCompleteAtTime(base::TimeTicks time); |
| 78 void ResetBaseline(); | 79 void ResetBaseline(); |
| 79 | 80 |
| 80 TopControlsManagerClient* client_; // The client manages the lifecycle of | 81 TopControlsManagerClient* client_; // The client manages the lifecycle of |
| 81 // this. | 82 // this. |
| 82 | 83 |
| 83 scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_; | 84 scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 99 float top_controls_hide_threshold_; | 100 float top_controls_hide_threshold_; |
| 100 | 101 |
| 101 bool pinch_gesture_active_; | 102 bool pinch_gesture_active_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); | 104 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 } // namespace cc | 107 } // namespace cc |
| 107 | 108 |
| 108 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ | 109 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
| OLD | NEW |