| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 float shownRatio() const { return m_shownRatio; } | 38 float shownRatio() const { return m_shownRatio; } |
| 39 void setShownRatio(float); | 39 void setShownRatio(float); |
| 40 | 40 |
| 41 void updateConstraintsAndState(WebTopControlsState constraints, | 41 void updateConstraintsAndState(WebTopControlsState constraints, |
| 42 WebTopControlsState current, | 42 WebTopControlsState current, |
| 43 bool animate); | 43 bool animate); |
| 44 | 44 |
| 45 void scrollBegin(); | 45 void scrollBegin(); |
| 46 | 46 |
| 47 // Scrolls top controls vertically if possible and returns the remaining scrol
l | 47 // Scrolls top controls vertically if possible and returns the remaining |
| 48 // amount. | 48 // scroll amount. |
| 49 FloatSize scrollBy(FloatSize scrollDelta); | 49 FloatSize scrollBy(FloatSize scrollDelta); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 explicit TopControls(const FrameHost&); | 52 explicit TopControls(const FrameHost&); |
| 53 void resetBaseline(); | 53 void resetBaseline(); |
| 54 | 54 |
| 55 Member<const FrameHost> m_frameHost; | 55 Member<const FrameHost> m_frameHost; |
| 56 | 56 |
| 57 // The top controls height regardless of whether it is visible or not. | 57 // The top controls height regardless of whether it is visible or not. |
| 58 float m_height; | 58 float m_height; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 // If this is true, then the embedder shrunk the WebView size by the top | 76 // If this is true, then the embedder shrunk the WebView size by the top |
| 77 // controls height. | 77 // controls height. |
| 78 bool m_shrinkViewport; | 78 bool m_shrinkViewport; |
| 79 | 79 |
| 80 // Constraints on the top controls state | 80 // Constraints on the top controls state |
| 81 WebTopControlsState m_permittedState; | 81 WebTopControlsState m_permittedState; |
| 82 }; | 82 }; |
| 83 } // namespace blink | 83 } // namespace blink |
| 84 | 84 |
| 85 #endif // TopControls_h | 85 #endif // TopControls_h |
| OLD | NEW |