| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 /** | 187 /** |
| 188 * @constructor | 188 * @constructor |
| 189 * @extends {WebInspector.OverridesView.Tab} | 189 * @extends {WebInspector.OverridesView.Tab} |
| 190 */ | 190 */ |
| 191 WebInspector.OverridesView.DeviceTab = function() | 191 WebInspector.OverridesView.DeviceTab = function() |
| 192 { | 192 { |
| 193 WebInspector.OverridesView.Tab.call(this, "device", WebInspector.UIString("D
evice"), [ | 193 WebInspector.OverridesView.Tab.call(this, "device", WebInspector.UIString("D
evice"), [ |
| 194 WebInspector.overridesSupport.settings.emulateResolution, | 194 WebInspector.overridesSupport.settings.emulateResolution, |
| 195 WebInspector.overridesSupport.settings.deviceScaleFactor, | 195 WebInspector.overridesSupport.settings.deviceScaleFactor, |
| 196 WebInspector.overridesSupport.settings.emulateViewport | 196 WebInspector.overridesSupport.settings.emulateMobile |
| 197 ]); | 197 ]); |
| 198 this.element.classList.add("overrides-device"); | 198 this.element.classList.add("overrides-device"); |
| 199 | 199 |
| 200 this.element.appendChild(this._createDeviceElement()); | 200 this.element.appendChild(this._createDeviceElement()); |
| 201 | 201 |
| 202 var footnote = this.element.createChild("p", "help-footnote"); | 202 var footnote = this.element.createChild("p", "help-footnote"); |
| 203 var footnoteLink = footnote.createChild("a"); | 203 var footnoteLink = footnote.createChild("a"); |
| 204 footnoteLink.href = "https://developers.google.com/chrome-developer-tools/do
cs/mobile-emulation"; | 204 footnoteLink.href = "https://developers.google.com/chrome-developer-tools/do
cs/mobile-emulation"; |
| 205 footnoteLink.target = "_blank"; | 205 footnoteLink.target = "_blank"; |
| 206 footnoteLink.createTextChild(WebInspector.UIString("More information about s
creen emulation")); | 206 footnoteLink.createTextChild(WebInspector.UIString("More information about s
creen emulation")); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 rowElement = tableElement.createChild("tr"); | 239 rowElement = tableElement.createChild("tr"); |
| 240 cellElement = rowElement.createChild("td"); | 240 cellElement = rowElement.createChild("td"); |
| 241 cellElement.colSpan = 4; | 241 cellElement.colSpan = 4; |
| 242 | 242 |
| 243 rowElement = tableElement.createChild("tr"); | 243 rowElement = tableElement.createChild("tr"); |
| 244 rowElement.title = WebInspector.UIString("Ratio between a device's physi
cal pixels and device-independent pixels."); | 244 rowElement.title = WebInspector.UIString("Ratio between a device's physi
cal pixels and device-independent pixels."); |
| 245 rowElement.createChild("td").appendChild(document.createTextNode(WebInsp
ector.UIString("Device pixel ratio:"))); | 245 rowElement.createChild("td").appendChild(document.createTextNode(WebInsp
ector.UIString("Device pixel ratio:"))); |
| 246 rowElement.createChild("td").appendChild(WebInspector.SettingsUI.createS
ettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, t
rue, 4, "80px", WebInspector.OverridesSupport.deviceScaleFactorValidator, true,
true, WebInspector.UIString("\u2013"))); | 246 rowElement.createChild("td").appendChild(WebInspector.SettingsUI.createS
ettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, t
rue, 4, "80px", WebInspector.OverridesSupport.deviceScaleFactorValidator, true,
true, WebInspector.UIString("\u2013"))); |
| 247 | 247 |
| 248 var viewportCheckbox = this._createSettingCheckbox(WebInspector.UIString
("Emulate mobile"), WebInspector.overridesSupport.settings.emulateViewport); | 248 var mobileCheckbox = this._createSettingCheckbox(WebInspector.UIString("
Emulate mobile"), WebInspector.overridesSupport.settings.emulateMobile); |
| 249 viewportCheckbox.title = WebInspector.UIString("Enable meta viewport, ov
erlay scrollbars, text autosizing and default 980px body width"); | 249 mobileCheckbox.title = WebInspector.UIString("Enable meta viewport, over
lay scrollbars, text autosizing and default 980px body width"); |
| 250 fieldsetElement.appendChild(viewportCheckbox); | 250 fieldsetElement.appendChild(mobileCheckbox); |
| 251 | 251 |
| 252 fieldsetElement.appendChild(this._createSettingCheckbox(WebInspector.UIS
tring("Shrink to fit"), WebInspector.overridesSupport.settings.deviceFitWindow))
; | 252 fieldsetElement.appendChild(this._createSettingCheckbox(WebInspector.UIS
tring("Shrink to fit"), WebInspector.overridesSupport.settings.deviceFitWindow))
; |
| 253 | 253 |
| 254 return fieldsetElement; | 254 return fieldsetElement; |
| 255 }, | 255 }, |
| 256 | 256 |
| 257 __proto__: WebInspector.OverridesView.Tab.prototype | 257 __proto__: WebInspector.OverridesView.Tab.prototype |
| 258 } | 258 } |
| 259 | 259 |
| 260 /** | 260 /** |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 WebInspector.OverridesView.Revealer.prototype = { | 650 WebInspector.OverridesView.Revealer.prototype = { |
| 651 /** | 651 /** |
| 652 * @param {!Object} overridesSupport | 652 * @param {!Object} overridesSupport |
| 653 */ | 653 */ |
| 654 reveal: function(overridesSupport) | 654 reveal: function(overridesSupport) |
| 655 { | 655 { |
| 656 WebInspector.inspectorView.showViewInDrawer("emulation"); | 656 WebInspector.inspectorView.showViewInDrawer("emulation"); |
| 657 } | 657 } |
| 658 } | 658 } |
| OLD | NEW |