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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 * @extends {WebInspector.OverridesView.Tab} | 827 * @extends {WebInspector.OverridesView.Tab} |
828 */ | 828 */ |
829 WebInspector.OverridesView.SensorsTab = function() | 829 WebInspector.OverridesView.SensorsTab = function() |
830 { | 830 { |
831 WebInspector.OverridesView.Tab.call(this, "sensors", WebInspector.UIString("
Sensors"), [WebInspector.settings.emulateTouchEvents, WebInspector.settings.over
rideGeolocation, WebInspector.settings.overrideDeviceOrientation]); | 831 WebInspector.OverridesView.Tab.call(this, "sensors", WebInspector.UIString("
Sensors"), [WebInspector.settings.emulateTouchEvents, WebInspector.settings.over
rideGeolocation, WebInspector.settings.overrideDeviceOrientation]); |
832 this.element.classList.add("overrides-sensors"); | 832 this.element.classList.add("overrides-sensors"); |
833 this.registerRequiredCSS("accelerometer.css"); | 833 this.registerRequiredCSS("accelerometer.css"); |
834 if (!WebInspector.OverridesSupport.isInspectingDevice()) | 834 if (!WebInspector.OverridesSupport.isInspectingDevice()) |
835 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIStri
ng("Emulate touch screen"), WebInspector.settings.emulateTouchEvents)); | 835 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIStri
ng("Emulate touch screen"), WebInspector.settings.emulateTouchEvents)); |
836 this._appendGeolocationOverrideControl(); | 836 this._appendGeolocationOverrideControl(); |
837 if (!WebInspector.OverridesSupport.isInspectingDevice()) | 837 this._apendDeviceOrientationOverrideControl(); |
838 this._apendDeviceOrientationOverrideControl(); | |
839 } | 838 } |
840 | 839 |
841 WebInspector.OverridesView.SensorsTab.prototype = { | 840 WebInspector.OverridesView.SensorsTab.prototype = { |
842 _appendGeolocationOverrideControl: function() | 841 _appendGeolocationOverrideControl: function() |
843 { | 842 { |
844 const geolocationSetting = WebInspector.settings.geolocationOverride.get
(); | 843 const geolocationSetting = WebInspector.settings.geolocationOverride.get
(); |
845 var geolocation = WebInspector.OverridesSupport.GeolocationPosition.pars
eSetting(geolocationSetting); | 844 var geolocation = WebInspector.OverridesSupport.GeolocationPosition.pars
eSetting(geolocationSetting); |
846 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIStri
ng("Emulate geolocation coordinates"), WebInspector.settings.overrideGeolocation
, this._geolocationOverrideCheckboxClicked.bind(this))); | 845 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIStri
ng("Emulate geolocation coordinates"), WebInspector.settings.overrideGeolocation
, this._geolocationOverrideCheckboxClicked.bind(this))); |
847 this.element.appendChild(this._createGeolocationOverrideElement(geolocat
ion)); | 846 this.element.appendChild(this._createGeolocationOverrideElement(geolocat
ion)); |
848 this._geolocationOverrideCheckboxClicked(WebInspector.settings.overrideG
eolocation.get()); | 847 this._geolocationOverrideCheckboxClicked(WebInspector.settings.overrideG
eolocation.get()); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 | 1088 |
1090 __proto__ : WebInspector.OverridesView.Tab.prototype | 1089 __proto__ : WebInspector.OverridesView.Tab.prototype |
1091 } | 1090 } |
1092 | 1091 |
1093 /** @enum {string} */ | 1092 /** @enum {string} */ |
1094 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { | 1093 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { |
1095 UserInput: "userInput", | 1094 UserInput: "userInput", |
1096 UserDrag: "userDrag", | 1095 UserDrag: "userDrag", |
1097 ResetButton: "resetButton" | 1096 ResetButton: "resetButton" |
1098 } | 1097 } |
OLD | NEW |