| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 TopControls_h | 5 #ifndef TopControls_h |
| 6 #define TopControls_h | 6 #define TopControls_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "public/platform/WebTopControlsState.h" | 10 #include "public/platform/WebTopControlsState.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // The amount that top controls are currently shown. | 32 // The amount that top controls are currently shown. |
| 33 float contentOffset(); | 33 float contentOffset(); |
| 34 | 34 |
| 35 float height() const { return m_height; } | 35 float height() const { return m_height; } |
| 36 bool shrinkViewport() const { return m_shrinkViewport; } | 36 bool shrinkViewport() const { return m_shrinkViewport; } |
| 37 void setHeight(float height, bool shrinkViewport); | 37 void setHeight(float height, bool shrinkViewport); |
| 38 | 38 |
| 39 float shownRatio() const { return m_shownRatio; } | 39 float shownRatio() const { return m_shownRatio; } |
| 40 void setShownRatio(float); | 40 void setShownRatio(float); |
| 41 | 41 |
| 42 void updateConstraints(WebTopControlsState constraints); | 42 void updateConstraintsAndState( |
| 43 WebTopControlsState constraints, |
| 44 WebTopControlsState current, |
| 45 bool animate); |
| 43 | 46 |
| 44 void scrollBegin(); | 47 void scrollBegin(); |
| 45 | 48 |
| 46 // Scrolls top controls vertically if possible and returns the remaining scr
oll | 49 // Scrolls top controls vertically if possible and returns the remaining scr
oll |
| 47 // amount. | 50 // amount. |
| 48 FloatSize scrollBy(FloatSize scrollDelta); | 51 FloatSize scrollBy(FloatSize scrollDelta); |
| 49 | 52 |
| 50 private: | 53 private: |
| 51 explicit TopControls(const FrameHost&); | 54 explicit TopControls(const FrameHost&); |
| 52 void resetBaseline(); | 55 void resetBaseline(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 // controls height. | 79 // controls height. |
| 77 bool m_shrinkViewport; | 80 bool m_shrinkViewport; |
| 78 | 81 |
| 79 // Constraints on the top controls state | 82 // Constraints on the top controls state |
| 80 WebTopControlsState m_permittedState; | 83 WebTopControlsState m_permittedState; |
| 81 | 84 |
| 82 }; | 85 }; |
| 83 } // namespace blink | 86 } // namespace blink |
| 84 | 87 |
| 85 #endif // TopControls_h | 88 #endif // TopControls_h |
| OLD | NEW |