OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 BrowserControls_h | 5 #ifndef BrowserControls_h |
6 #define BrowserControls_h | 6 #define BrowserControls_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/WebBrowserControlsState.h" | 10 #include "public/platform/WebBrowserControlsState.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void updateConstraintsAndState(WebBrowserControlsState constraints, | 42 void updateConstraintsAndState(WebBrowserControlsState constraints, |
43 WebBrowserControlsState current, | 43 WebBrowserControlsState current, |
44 bool animate); | 44 bool animate); |
45 | 45 |
46 void scrollBegin(); | 46 void scrollBegin(); |
47 | 47 |
48 // Scrolls browser controls vertically if possible and returns the remaining | 48 // Scrolls browser controls vertically if possible and returns the remaining |
49 // scroll amount. | 49 // scroll amount. |
50 FloatSize scrollBy(FloatSize scrollDelta); | 50 FloatSize scrollBy(FloatSize scrollDelta); |
51 | 51 |
52 WebBrowserControlsState permittedState() const { return m_permittedState; } | |
53 | |
54 private: | 52 private: |
55 explicit BrowserControls(const FrameHost&); | 53 explicit BrowserControls(const FrameHost&); |
56 void resetBaseline(); | 54 void resetBaseline(); |
57 | 55 |
58 Member<const FrameHost> m_frameHost; | 56 Member<const FrameHost> m_frameHost; |
59 | 57 |
60 // The browser controls height regardless of whether it is visible or not. | 58 // The browser controls height regardless of whether it is visible or not. |
61 float m_height; | 59 float m_height; |
62 | 60 |
63 // The browser controls shown amount (normalized from 0 to 1) since the last | 61 // The browser controls shown amount (normalized from 0 to 1) since the last |
(...skipping 15 matching lines...) Expand all Loading... |
79 // If this is true, then the embedder shrunk the WebView size by the top | 77 // If this is true, then the embedder shrunk the WebView size by the top |
80 // controls height. | 78 // controls height. |
81 bool m_shrinkViewport; | 79 bool m_shrinkViewport; |
82 | 80 |
83 // Constraints on the browser controls state | 81 // Constraints on the browser controls state |
84 WebBrowserControlsState m_permittedState; | 82 WebBrowserControlsState m_permittedState; |
85 }; | 83 }; |
86 } // namespace blink | 84 } // namespace blink |
87 | 85 |
88 #endif // BrowserControls_h | 86 #endif // BrowserControls_h |
OLD | NEW |