| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return controls_top_offset_ + top_controls_height_; | 49 return controls_top_offset_ + top_controls_height_; |
| 50 } | 50 } |
| 51 KeyframedFloatAnimationCurve* animation() { | 51 KeyframedFloatAnimationCurve* animation() { |
| 52 return top_controls_animation_.get(); | 52 return top_controls_animation_.get(); |
| 53 } | 53 } |
| 54 AnimationDirection animation_direction() { return animation_direction_; } | 54 AnimationDirection animation_direction() { return animation_direction_; } |
| 55 | 55 |
| 56 void UpdateTopControlsState(bool enable_hiding, | 56 void UpdateTopControlsState(bool enable_hiding, |
| 57 bool enable_showing, | 57 bool enable_showing, |
| 58 bool animate); | 58 bool animate); |
| 59 void ShowTopControls(bool show); |
| 59 | 60 |
| 60 void ScrollBegin(); | 61 void ScrollBegin(); |
| 61 gfx::Vector2dF ScrollBy(const gfx::Vector2dF pending_delta); | 62 gfx::Vector2dF ScrollBy(const gfx::Vector2dF pending_delta); |
| 62 void ScrollEnd(); | 63 void ScrollEnd(); |
| 63 | 64 |
| 64 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); | 65 gfx::Vector2dF Animate(base::TimeTicks monotonic_time); |
| 65 | 66 |
| 66 protected: | 67 protected: |
| 67 TopControlsManager(TopControlsManagerClient* client, | 68 TopControlsManager(TopControlsManagerClient* client, |
| 68 float top_controls_height, | 69 float top_controls_height, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 95 // The height of the visible top control such that it must be hidden when | 96 // The height of the visible top control such that it must be hidden when |
| 96 // the user stops the scroll. | 97 // the user stops the scroll. |
| 97 float top_controls_hide_height_; | 98 float top_controls_hide_height_; |
| 98 | 99 |
| 99 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); | 100 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace cc | 103 } // namespace cc |
| 103 | 104 |
| 104 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ | 105 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
| OLD | NEW |