| 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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 var cellElement = rowElement.createChild("td"); | 506 var cellElement = rowElement.createChild("td"); |
| 507 cellElement = rowElement.createChild("td"); | 507 cellElement = rowElement.createChild("td"); |
| 508 cellElement.createTextChild(WebInspector.UIString("Lat = ")); | 508 cellElement.createTextChild(WebInspector.UIString("Lat = ")); |
| 509 this._latitudeElement = WebInspector.SettingsUI.createInput(cellElement,
"geolocation-override-latitude", String(geolocation.latitude), this._applyGeolo
cationUserInput.bind(this), true); | 509 this._latitudeElement = WebInspector.SettingsUI.createInput(cellElement,
"geolocation-override-latitude", String(geolocation.latitude), this._applyGeolo
cationUserInput.bind(this), true); |
| 510 cellElement.createTextChild(" , "); | 510 cellElement.createTextChild(" , "); |
| 511 cellElement.createTextChild(WebInspector.UIString("Lon = ")); | 511 cellElement.createTextChild(WebInspector.UIString("Lon = ")); |
| 512 this._longitudeElement = WebInspector.SettingsUI.createInput(cellElement
, "geolocation-override-longitude", String(geolocation.longitude), this._applyGe
olocationUserInput.bind(this), true); | 512 this._longitudeElement = WebInspector.SettingsUI.createInput(cellElement
, "geolocation-override-longitude", String(geolocation.longitude), this._applyGe
olocationUserInput.bind(this), true); |
| 513 rowElement = tableElement.createChild("tr"); | 513 rowElement = tableElement.createChild("tr"); |
| 514 cellElement = rowElement.createChild("td"); | 514 cellElement = rowElement.createChild("td"); |
| 515 cellElement.colSpan = 2; | 515 cellElement.colSpan = 2; |
| 516 var geolocationErrorLabelElement = createElement("label"); | 516 var geolocationErrorLabelElement = createCheckboxLabel(WebInspector.UISt
ring("Emulate position unavailable"), !geolocation || !!geolocation.error); |
| 517 var geolocationErrorCheckboxElement = geolocationErrorLabelElement.creat
eChild("input"); | 517 var geolocationErrorCheckboxElement = geolocationErrorLabelElement.check
boxElement; |
| 518 geolocationErrorCheckboxElement.id = "geolocation-error"; | 518 geolocationErrorCheckboxElement.id = "geolocation-error"; |
| 519 geolocationErrorCheckboxElement.type = "checkbox"; | |
| 520 geolocationErrorCheckboxElement.checked = !geolocation || geolocation.er
ror; | |
| 521 geolocationErrorCheckboxElement.addEventListener("click", this._applyGeo
locationUserInput.bind(this), false); | 519 geolocationErrorCheckboxElement.addEventListener("click", this._applyGeo
locationUserInput.bind(this), false); |
| 522 geolocationErrorLabelElement.createTextChild(WebInspector.UIString("Emul
ate position unavailable")); | |
| 523 this._geolocationErrorElement = geolocationErrorCheckboxElement; | 520 this._geolocationErrorElement = geolocationErrorCheckboxElement; |
| 524 cellElement.appendChild(geolocationErrorLabelElement); | 521 cellElement.appendChild(geolocationErrorLabelElement); |
| 525 | 522 |
| 526 return fieldsetElement; | 523 return fieldsetElement; |
| 527 }, | 524 }, |
| 528 | 525 |
| 529 _apendDeviceOrientationOverrideControl: function() | 526 _apendDeviceOrientationOverrideControl: function() |
| 530 { | 527 { |
| 531 const deviceOrientationSetting = WebInspector.overridesSupport.settings.
deviceOrientationOverride.get(); | 528 const deviceOrientationSetting = WebInspector.overridesSupport.settings.
deviceOrientationOverride.get(); |
| 532 var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.
parseSetting(deviceOrientationSetting); | 529 var deviceOrientation = WebInspector.OverridesSupport.DeviceOrientation.
parseSetting(deviceOrientationSetting); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 * @override | 717 * @override |
| 721 * @param {!Object} overridesSupport | 718 * @param {!Object} overridesSupport |
| 722 * @return {!Promise} | 719 * @return {!Promise} |
| 723 */ | 720 */ |
| 724 reveal: function(overridesSupport) | 721 reveal: function(overridesSupport) |
| 725 { | 722 { |
| 726 WebInspector.inspectorView.showViewInDrawer("emulation"); | 723 WebInspector.inspectorView.showViewInDrawer("emulation"); |
| 727 return Promise.resolve(); | 724 return Promise.resolve(); |
| 728 } | 725 } |
| 729 } | 726 } |
| OLD | NEW |