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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 float controls_top_offset() { return controls_top_offset_; } | 42 float controls_top_offset() { return controls_top_offset_; } |
43 float content_top_offset() { | 43 float content_top_offset() { |
44 return controls_top_offset_ + top_controls_height_; | 44 return controls_top_offset_ + top_controls_height_; |
45 } | 45 } |
46 KeyframedFloatAnimationCurve* animation() { | 46 KeyframedFloatAnimationCurve* animation() { |
47 return top_controls_animation_.get(); | 47 return top_controls_animation_.get(); |
48 } | 48 } |
49 AnimationDirection animation_direction() { return animation_direction_; } | 49 AnimationDirection animation_direction() { return animation_direction_; } |
50 | 50 |
| 51 void UpdateTopControlsStatePreservingConstraints( |
| 52 TopControlsState current, |
| 53 bool animate); |
51 void UpdateTopControlsState(TopControlsState constraints, | 54 void UpdateTopControlsState(TopControlsState constraints, |
52 TopControlsState current, | 55 TopControlsState current, |
53 bool animate); | 56 bool animate); |
54 | 57 |
55 void ScrollBegin(); | 58 void ScrollBegin(); |
56 gfx::Vector2dF ScrollBy(const gfx::Vector2dF pending_delta); | 59 gfx::Vector2dF ScrollBy(const gfx::Vector2dF pending_delta); |
57 void ScrollEnd(); | 60 void ScrollEnd(); |
58 | 61 |
59 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); | 62 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); |
60 | 63 |
(...skipping 29 matching lines...) Expand all Loading... |
90 // The height of the visible top control such that it must be hidden when | 93 // The height of the visible top control such that it must be hidden when |
91 // the user stops the scroll. | 94 // the user stops the scroll. |
92 float top_controls_hide_height_; | 95 float top_controls_hide_height_; |
93 | 96 |
94 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); | 97 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); |
95 }; | 98 }; |
96 | 99 |
97 } // namespace cc | 100 } // namespace cc |
98 | 101 |
99 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ | 102 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
OLD | NEW |