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

Unified Diff: Source/devtools/front_end/sdk/OverridesSupport.js

Issue 1040103002: [DevTools] Cleanup Page domain calls, which should be Emulation calls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: supportsRendering to RenderingOptions Created 5 years, 9 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
« no previous file with comments | « Source/devtools/front_end/main/RenderingOptions.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/OverridesSupport.js
diff --git a/Source/devtools/front_end/sdk/OverridesSupport.js b/Source/devtools/front_end/sdk/OverridesSupport.js
index 93f762712d3aa7b11ff71572cafbe8b0e01df751..8efebcfef061e79c55a23b14c7aa955d8a493653 100644
--- a/Source/devtools/front_end/sdk/OverridesSupport.js
+++ b/Source/devtools/front_end/sdk/OverridesSupport.js
@@ -248,7 +248,7 @@ WebInspector.OverridesSupport.DeviceOrientation.parseUserInput = function(alphaS
WebInspector.OverridesSupport.DeviceOrientation._clearDeviceOrientationOverride = function()
{
for (var target of WebInspector.targetManager.targets())
- target.pageAgent().clearDeviceOrientationOverride();
+ target.deviceOrientationAgent().clearDeviceOrientationOverride();
}
/**
@@ -626,12 +626,16 @@ WebInspector.OverridesSupport.prototype = {
_geolocationPositionChanged: function()
{
if (!this.emulationEnabled() || !this.settings.overrideGeolocation.get()) {
- for (var target of WebInspector.targetManager.targets())
- target.emulationAgent().clearGeolocationOverride();
+ for (var target of WebInspector.targetManager.targets()) {
+ if (target.supportsEmulation())
+ target.emulationAgent().clearGeolocationOverride();
+ }
return;
}
var geolocation = WebInspector.OverridesSupport.GeolocationPosition.parseSetting(this.settings.geolocationOverride.get());
for (var target of WebInspector.targetManager.targets()) {
+ if (!target.supportsEmulation())
+ continue;
if (geolocation.error)
target.emulationAgent().setGeolocationOverride();
else
@@ -648,7 +652,7 @@ WebInspector.OverridesSupport.prototype = {
var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.parseSetting(this.settings.deviceOrientationOverride.get());
for (var target of WebInspector.targetManager.targets())
- target.pageAgent().setDeviceOrientationOverride(deviceOrientation.alpha, deviceOrientation.beta, deviceOrientation.gamma);
+ target.deviceOrientationAgent().setDeviceOrientationOverride(deviceOrientation.alpha, deviceOrientation.beta, deviceOrientation.gamma);
},
_emulateTouchEventsChanged: function()
« no previous file with comments | « Source/devtools/front_end/main/RenderingOptions.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698