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

Unified Diff: third_party/WebKit/Source/core/frame/FrameHost.h

Issue 2096633002: Adds scroll position/scale emulation to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Emulator using GC, moved to FrameHost, addressed other comments. Created 4 years, 5 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/frame/FrameHost.h
diff --git a/third_party/WebKit/Source/core/frame/FrameHost.h b/third_party/WebKit/Source/core/frame/FrameHost.h
index 1160c90f612e2141793f5003c761af8976d63695..e16dfa5209224113e81cb96ac58e1cf48ff3ec8c 100644
--- a/third_party/WebKit/Source/core/frame/FrameHost.h
+++ b/third_party/WebKit/Source/core/frame/FrameHost.h
@@ -43,11 +43,14 @@ namespace blink {
class ChromeClient;
class CustomElementReactionStack;
class Deprecation;
+class DoublePoint;
class EventHandlerRegistry;
+class IntPoint;
class OverscrollController;
class Page;
struct PageScaleConstraints;
class PageScaleConstraintsSet;
+class ScrollAndScaleEmulator;
class Settings;
class TopControls;
class UseCounter;
@@ -130,6 +133,11 @@ public:
void setDefaultPageScaleLimits(float minScale, float maxScale);
void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstraints);
+ // Override the page scale and scroll positions of main frame and visual viewport.
+ void setScrollAndScaleOverride(const IntPoint& framePosition, const DoublePoint& visualViewportPosition, float pageScale);
+ void clearScrollAndScaleOverride();
+ ScrollAndScaleEmulator* scrollAndScaleEmulator() { return m_scrollAndScaleEmulator; }
+
private:
explicit FrameHost(Page&);
@@ -140,6 +148,7 @@ private:
const Member<OverscrollController> m_overscrollController;
const Member<EventHandlerRegistry> m_eventHandlerRegistry;
const Member<CustomElementReactionStack> m_customElementReactionStack;
+ Member<ScrollAndScaleEmulator> m_scrollAndScaleEmulator;
AtomicString m_overrideEncoding;
int m_subframeCount;

Powered by Google App Engine
This is Rietveld 408576698