Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1943)

Unified Diff: Source/web/WebViewImpl.h

Issue 893683003: Implement top controls show/hide functionality for main thread scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix minor macro issue Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebViewImpl.h
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h
index 70896b71787c276cb6bcbd6633204d8511a97c80..86f470dbbd0a43aae891b4261845566daee91795 100644
--- a/Source/web/WebViewImpl.h
+++ b/Source/web/WebViewImpl.h
@@ -73,6 +73,7 @@ class InputMethodContext;
class LinkHighlight;
class PopupContainer;
class LayerCompositor;
+class TopControls;
class UserGestureToken;
class WebActiveGestureAnimation;
class WebDevToolsAgentImpl;
@@ -517,15 +518,17 @@ public:
bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_matchesHeuristicsForGpuRasterization; }
virtual void setTopControlsHeight(float height, bool topControlsShrinkLayoutSize) override;
+ virtual void updateTopControlsState(WebTopControlsState constraint, WebTopControlsState current, bool animate) override;
+
+ TopControls& topControls();
+ // Called anytime top controls layout height or content offset have changed.
+ void didUpdateTopControls();
virtual void forceNextWebGLContextCreationToFail() override;
IntSize mainFrameSize();
private:
- void didUpdateTopControls();
- void setTopControlsShownRatio(float);
-
// TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made private to
// prevent external usage
virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) override;
@@ -756,15 +759,6 @@ private:
float m_zoomFactorOverride;
bool m_userGestureObserved;
-
- // The top controls shown amount (normalized from 0 to 1) since the last
- // compositor commit.
- float m_topControlsShownRatio;
-
- float m_topControlsHeight;
- // If this is true, then the embedder shrunk the WebView size by the top
- // controls height.
- bool m_topControlsShrinkLayoutSize;
};
DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.isWebView());

Powered by Google App Engine
This is Rietveld 408576698