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

Unified Diff: Source/web/WebViewImpl.h

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Moved input events adjustments to Blink Created 7 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: Source/web/WebViewImpl.h
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h
index 7e96a978da8417940d0a70fb24b221e9f87cbdea..5960cce0fbae6deeb8b0d5aed628b9d731c03be5 100644
--- a/Source/web/WebViewImpl.h
+++ b/Source/web/WebViewImpl.h
@@ -289,6 +289,7 @@ public:
virtual bool inspectorSetting(const WebString& key, WebString* value) const;
virtual void setInspectorSetting(const WebString& key,
const WebString& value);
+ virtual void setDeviceEmulationParameters(bool enabled, float deviceScaleFactor, float rootLayerScale);
virtual WebDevToolsAgent* devToolsAgent();
virtual WebAXObject accessibilityObject();
virtual void applyAutofillSuggestions(
@@ -628,6 +629,8 @@ private:
void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
void reallocateRenderer();
void updateLayerTreeViewport();
+ void updateRootLayerTransform();
+ void updateLayerTreeDeviceScaleFactor();
// Helper function: Widens the width of |source| by the specified margins
// while keeping it smaller than page width.
@@ -727,6 +730,9 @@ private:
bool m_ignoreInputEvents;
+ float m_emulatedDeviceScaleFactor;
+ float m_rootLayerScale;
+
// Webkit expects keyPress events to be suppressed if the associated keyDown
// event was handled. Safari implements this behavior by peeking out the
// associated WM_CHAR event if the keydown was handled. We emulate

Powered by Google App Engine
This is Rietveld 408576698