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