| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @implements {WebInspector.ListWidget.Delegate} | 8 * @implements {WebInspector.ListWidget.Delegate} |
| 9 */ | 9 */ |
| 10 WebInspector.DevicesSettingsTab = function() | 10 WebInspector.DevicesSettingsTab = function() |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 this._list.registerRequiredCSS("emulation/devicesSettingsTab.css"); | 26 this._list.registerRequiredCSS("emulation/devicesSettingsTab.css"); |
| 27 this._list.element.classList.add("devices-list"); | 27 this._list.element.classList.add("devices-list"); |
| 28 this._list.show(this.containerElement); | 28 this._list.show(this.containerElement); |
| 29 | 29 |
| 30 this._muteUpdate = false; | 30 this._muteUpdate = false; |
| 31 this._emulatedDevicesList = WebInspector.EmulatedDevicesList.instance(); | 31 this._emulatedDevicesList = WebInspector.EmulatedDevicesList.instance(); |
| 32 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.CustomDevicesUpdated, this._devicesUpdated, this); | 32 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.CustomDevicesUpdated, this._devicesUpdated, this); |
| 33 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.StandardDevicesUpdated, this._devicesUpdated, this); | 33 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.StandardDevicesUpdated, this._devicesUpdated, this); |
| 34 | 34 |
| 35 this.setDefaultFocusedElement(this._addCustomButton); | 35 this.setDefaultFocusedElement(this._addCustomButton); |
| 36 } | 36 }; |
| 37 | 37 |
| 38 WebInspector.DevicesSettingsTab.prototype = { | 38 WebInspector.DevicesSettingsTab.prototype = { |
| 39 wasShown: function() | 39 wasShown: function() |
| 40 { | 40 { |
| 41 WebInspector.VBox.prototype.wasShown.call(this); | 41 WebInspector.VBox.prototype.wasShown.call(this); |
| 42 this._devicesUpdated(); | 42 this._devicesUpdated(); |
| 43 }, | 43 }, |
| 44 | 44 |
| 45 _devicesUpdated: function() | 45 _devicesUpdated: function() |
| 46 { | 46 { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 * @param {!HTMLInputElement|!HTMLSelectElement} input | 248 * @param {!HTMLInputElement|!HTMLSelectElement} input |
| 249 * @return {boolean} | 249 * @return {boolean} |
| 250 */ | 250 */ |
| 251 function scaleValidator(item, index, input) | 251 function scaleValidator(item, index, input) |
| 252 { | 252 { |
| 253 return WebInspector.DeviceModeModel.deviceScaleFactorValidator(input
.value); | 253 return WebInspector.DeviceModeModel.deviceScaleFactorValidator(input
.value); |
| 254 } | 254 } |
| 255 }, | 255 }, |
| 256 | 256 |
| 257 __proto__: WebInspector.VBox.prototype | 257 __proto__: WebInspector.VBox.prototype |
| 258 } | 258 }; |
| OLD | NEW |