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

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 1632983002: [DevTools] Do not reset scroll when emulating device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 44ed45095d8384e64a4090c0bc2d08b0f127f028..9732c91e87c3e3d65a730de989cad25975d464ce 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -157,6 +157,17 @@ bool DevToolsEmulator::doubleTapToZoomEnabled() const
return m_touchEventEmulationEnabled ? true : m_doubleTapToZoomEnabled;
}
+void DevToolsEmulator::setMainFrameResizesAreOrientationChanges(bool enabled)
+{
+ m_mainFrameResizesAreOrientationChanges = enabled;
+}
+
+bool DevToolsEmulator::mainFrameResizesAreOrientationChanges() const
+{
+ bool emulateMobileEnabled = m_deviceMetricsEnabled && m_emulateMobileEnabled;
+ return emulateMobileEnabled ? true : m_mainFrameResizesAreOrientationChanges;
+}
+
void DevToolsEmulator::setAvailablePointerTypes(int types)
{
m_embedderAvailablePointerTypes = types;
« no previous file with comments | « third_party/WebKit/Source/web/DevToolsEmulator.h ('k') | third_party/WebKit/Source/web/InspectorEmulationAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698