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

Side by Side Diff: Source/devtools/front_end/OverridesSupport.js

Issue 209333008: [DevTools] Support device orientation override on device with sensors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselined test Created 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 GeolocationAgent.setGeolocationOverride(geolocation.latitude, geoloc ation.longitude, 150); 512 GeolocationAgent.setGeolocationOverride(geolocation.latitude, geoloc ation.longitude, 150);
513 this.maybeHasActiveOverridesChanged(); 513 this.maybeHasActiveOverridesChanged();
514 }, 514 },
515 515
516 _deviceOrientationChanged: function() 516 _deviceOrientationChanged: function()
517 { 517 {
518 if (!WebInspector.settings.overrideDeviceOrientation.get()) { 518 if (!WebInspector.settings.overrideDeviceOrientation.get()) {
519 PageAgent.clearDeviceOrientationOverride(); 519 PageAgent.clearDeviceOrientationOverride();
520 return; 520 return;
521 } 521 }
522 if (WebInspector.OverridesSupport.isInspectingDevice())
523 return;
524 522
525 var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation. parseSetting(WebInspector.settings.deviceOrientationOverride.get()); 523 var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation. parseSetting(WebInspector.settings.deviceOrientationOverride.get());
526 PageAgent.setDeviceOrientationOverride(deviceOrientation.alpha, deviceOr ientation.beta, deviceOrientation.gamma); 524 PageAgent.setDeviceOrientationOverride(deviceOrientation.alpha, deviceOr ientation.beta, deviceOrientation.gamma);
527 this.maybeHasActiveOverridesChanged(); 525 this.maybeHasActiveOverridesChanged();
528 }, 526 },
529 527
530 _emulateTouchEventsChanged: function() 528 _emulateTouchEventsChanged: function()
531 { 529 {
532 if (WebInspector.OverridesSupport.isInspectingDevice() && WebInspector.s ettings.emulateTouchEvents.get()) 530 if (WebInspector.OverridesSupport.isInspectingDevice() && WebInspector.s ettings.emulateTouchEvents.get())
533 return; 531 return;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 }, 593 },
596 594
597 __proto__: WebInspector.Object.prototype 595 __proto__: WebInspector.Object.prototype
598 } 596 }
599 597
600 598
601 /** 599 /**
602 * @type {!WebInspector.OverridesSupport} 600 * @type {!WebInspector.OverridesSupport}
603 */ 601 */
604 WebInspector.overridesSupport; 602 WebInspector.overridesSupport;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698