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

Unified Diff: third_party/WebKit/Source/core/page/ChromeClient.h

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adress Dmitry's comments + sync. Created 4 years, 3 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: third_party/WebKit/Source/core/page/ChromeClient.h
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.h b/third_party/WebKit/Source/core/page/ChromeClient.h
index a2ae089b4b03b7cf62c8091b67c6289a33fcd00e..c1572f2927fecd491095cdf9e46e66bf6954ce1f 100644
--- a/third_party/WebKit/Source/core/page/ChromeClient.h
+++ b/third_party/WebKit/Source/core/page/ChromeClient.h
@@ -39,6 +39,7 @@
#include "public/platform/WebEventListenerProperties.h"
#include "public/platform/WebFocusType.h"
#include "wtf/Forward.h"
+#include "wtf/Optional.h"
#include "wtf/Vector.h"
#include <memory>
@@ -165,11 +166,15 @@ public:
// End methods used by HostWindow.
virtual Cursor lastSetCursorForTesting() const = 0;
+ // Returns a custom visible content rect if a viewport override is active.
+ virtual WTF::Optional<IntRect> visibleContentRectForPainting() const { return WTF::nullopt; }
+
virtual void dispatchViewportPropertiesDidChange(const ViewportDescription&) const { }
virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const = 0;
virtual void pageScaleFactorChanged() const { }
virtual float clampPageScaleFactorToLimits(float scale) const { return scale; }
+ virtual void mainFrameScrollOffsetChanged() const { }
virtual void layoutUpdated(LocalFrame*) const { }
void mouseDidMoveOverElement(const HitTestResult&);

Powered by Google App Engine
This is Rietveld 408576698