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

Side by Side Diff: cc/input/top_controls_manager.h

Issue 961023002: (Reland) Always create top controls manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed calculate_top_controls_position flag from Android flags Created 5 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
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698