| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 | 814 |
| 815 /** | 815 /** |
| 816 * @constructor | 816 * @constructor |
| 817 * @extends {WebInspector.OverridesView.Tab} | 817 * @extends {WebInspector.OverridesView.Tab} |
| 818 */ | 818 */ |
| 819 WebInspector.OverridesView.SensorsTab = function() | 819 WebInspector.OverridesView.SensorsTab = function() |
| 820 { | 820 { |
| 821 WebInspector.OverridesView.Tab.call(this, "sensors", WebInspector.UIString("
Sensors"), [WebInspector.settings.emulateTouchEvents, WebInspector.settings.over
rideGeolocation, WebInspector.settings.overrideDeviceOrientation]); | 821 WebInspector.OverridesView.Tab.call(this, "sensors", WebInspector.UIString("
Sensors"), [WebInspector.settings.emulateTouchEvents, WebInspector.settings.over
rideGeolocation, WebInspector.settings.overrideDeviceOrientation]); |
| 822 this.element.classList.add("overrides-sensors"); | 822 this.element.classList.add("overrides-sensors"); |
| 823 this.registerRequiredCSS("accelerometer.css"); | 823 this.registerRequiredCSS("accelerometer.css"); |
| 824 if (!WebInspector.OverridesSupport.isInspectingDevice()) | 824 if (!WebInspector.OverridesSupport.hasTouchInputs()) |
| 825 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIStri
ng("Emulate touch screen"), WebInspector.settings.emulateTouchEvents)); | 825 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIStri
ng("Emulate touch screen"), WebInspector.settings.emulateTouchEvents)); |
| 826 this._appendGeolocationOverrideControl(); | 826 this._appendGeolocationOverrideControl(); |
| 827 this._apendDeviceOrientationOverrideControl(); | 827 this._apendDeviceOrientationOverrideControl(); |
| 828 } | 828 } |
| 829 | 829 |
| 830 WebInspector.OverridesView.SensorsTab.prototype = { | 830 WebInspector.OverridesView.SensorsTab.prototype = { |
| 831 _appendGeolocationOverrideControl: function() | 831 _appendGeolocationOverrideControl: function() |
| 832 { | 832 { |
| 833 const geolocationSetting = WebInspector.settings.geolocationOverride.get
(); | 833 const geolocationSetting = WebInspector.settings.geolocationOverride.get
(); |
| 834 var geolocation = WebInspector.OverridesSupport.GeolocationPosition.pars
eSetting(geolocationSetting); | 834 var geolocation = WebInspector.OverridesSupport.GeolocationPosition.pars
eSetting(geolocationSetting); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 | 1078 |
| 1079 __proto__ : WebInspector.OverridesView.Tab.prototype | 1079 __proto__ : WebInspector.OverridesView.Tab.prototype |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 /** @enum {string} */ | 1082 /** @enum {string} */ |
| 1083 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { | 1083 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { |
| 1084 UserInput: "userInput", | 1084 UserInput: "userInput", |
| 1085 UserDrag: "userDrag", | 1085 UserDrag: "userDrag", |
| 1086 ResetButton: "resetButton" | 1086 ResetButton: "resetButton" |
| 1087 } | 1087 } |
| OLD | NEW |