| 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_TOP_CONTROLS_MANAGER_H_ | 5 #ifndef CC_TOP_CONTROLS_MANAGER_H_ |
| 6 #define CC_TOP_CONTROLS_MANAGER_H_ | 6 #define CC_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/layer_impl.h" | 10 #include "cc/layer_impl.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 void Animate(base::TimeTicks monotonic_time); | 44 void Animate(base::TimeTicks monotonic_time); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 TopControlsManager(TopControlsManagerClient* client, | 47 TopControlsManager(TopControlsManagerClient* client, |
| 48 float top_controls_height); | 48 float top_controls_height); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 gfx::Vector2dF ScrollInternal(const gfx::Vector2dF pending_delta); | 51 gfx::Vector2dF ScrollInternal(const gfx::Vector2dF pending_delta); |
| 52 void ResetAnimations(); | 52 void ResetAnimations(); |
| 53 LayerImpl* RootScrollLayer(); | |
| 54 float RootScrollLayerTotalScrollY(); | 53 float RootScrollLayerTotalScrollY(); |
| 55 void SetupAnimation(bool show_controls); | 54 void SetupAnimation(bool show_controls); |
| 56 void StartAnimationIfNecessary(); | 55 void StartAnimationIfNecessary(); |
| 57 | 56 |
| 58 TopControlsManagerClient* client_; // The client manages the lifecycle of | 57 TopControlsManagerClient* client_; // The client manages the lifecycle of |
| 59 // this. | 58 // this. |
| 60 | 59 |
| 61 scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_; | 60 scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_; |
| 62 bool is_showing_animation_; | 61 bool is_showing_animation_; |
| 63 bool is_overlay_mode_; | 62 bool is_overlay_mode_; |
| 64 float controls_top_offset_; | 63 float controls_top_offset_; |
| 65 float content_top_offset_; | 64 float content_top_offset_; |
| 66 float top_controls_height_; | 65 float top_controls_height_; |
| 67 bool scroll_readjustment_enabled_; | 66 bool scroll_readjustment_enabled_; |
| 68 float previous_root_scroll_offset_; | 67 float previous_root_scroll_offset_; |
| 69 | 68 |
| 70 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); | 69 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 } // namespace cc | 72 } // namespace cc |
| 74 | 73 |
| 75 #endif // CC_TOP_CONTROLS_MANAGER_H_ | 74 #endif // CC_TOP_CONTROLS_MANAGER_H_ |
| OLD | NEW |