Chromium Code Reviews| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 SHOWING_CONTROLS, | 29 SHOWING_CONTROLS, |
| 30 HIDING_CONTROLS | 30 HIDING_CONTROLS |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 static std::unique_ptr<TopControlsManager> Create( | 33 static std::unique_ptr<TopControlsManager> Create( |
| 34 TopControlsManagerClient* client, | 34 TopControlsManagerClient* client, |
| 35 float top_controls_show_threshold, | 35 float top_controls_show_threshold, |
| 36 float top_controls_hide_threshold); | 36 float top_controls_hide_threshold); |
| 37 virtual ~TopControlsManager(); | 37 virtual ~TopControlsManager(); |
| 38 | 38 |
| 39 // The amount of offset to translate the top controls. 0 or negative value. | |
|
bokan
2016/07/01 17:19:13
Thanks for adding comments.
Suggested change here
Ian Wen
2016/07/06 20:53:44
done.
| |
| 39 float ControlsTopOffset() const; | 40 float ControlsTopOffset() const; |
| 41 // The amount of offset of the web content area. Same as the current shown | |
| 42 // height of the top controls. | |
| 40 float ContentTopOffset() const; | 43 float ContentTopOffset() const; |
| 41 float TopControlsShownRatio() const; | 44 float TopControlsShownRatio() const; |
| 42 float TopControlsHeight() const; | 45 float TopControlsHeight() const; |
|
bokan
2016/07/01 17:19:14
Please comment that this is a static value. The ac
Ian Wen
2016/07/06 20:53:44
Done.
| |
| 43 | 46 |
| 47 // The amount of offset to translate the bottom controls. 0 or positive value. | |
| 48 float ControlsBottomOffset() const; | |
| 49 // The amount of offset of the web content area, calculating from the bottom. | |
| 50 // Same as the current shown height of the bottom controls. | |
| 51 float ContentBottomOffset() const; | |
| 52 float BottomControlsHeight() const; | |
| 53 | |
| 44 bool has_animation() const { return animation_direction_ != NO_ANIMATION; } | 54 bool has_animation() const { return animation_direction_ != NO_ANIMATION; } |
| 45 AnimationDirection animation_direction() { return animation_direction_; } | 55 AnimationDirection animation_direction() { return animation_direction_; } |
| 46 | 56 |
| 47 void UpdateTopControlsState(TopControlsState constraints, | 57 void UpdateTopControlsState(TopControlsState constraints, |
| 48 TopControlsState current, | 58 TopControlsState current, |
| 49 bool animate); | 59 bool animate); |
| 50 | 60 |
| 51 void ScrollBegin(); | 61 void ScrollBegin(); |
| 52 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& pending_delta); | 62 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& pending_delta); |
| 53 void ScrollEnd(); | 63 void ScrollEnd(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 float top_controls_hide_threshold_; | 109 float top_controls_hide_threshold_; |
| 100 | 110 |
| 101 bool pinch_gesture_active_; | 111 bool pinch_gesture_active_; |
| 102 | 112 |
| 103 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); | 113 DISALLOW_COPY_AND_ASSIGN(TopControlsManager); |
| 104 }; | 114 }; |
| 105 | 115 |
| 106 } // namespace cc | 116 } // namespace cc |
| 107 | 117 |
| 108 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ | 118 #endif // CC_INPUT_TOP_CONTROLS_MANAGER_H_ |
| OLD | NEW |