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 18 matching lines...) Expand all Loading... |
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 /** |
| 40 * @override |
| 41 */ |
39 wasShown: function() | 42 wasShown: function() |
40 { | 43 { |
41 WebInspector.VBox.prototype.wasShown.call(this); | 44 WebInspector.VBox.prototype.wasShown.call(this); |
42 this._devicesUpdated(); | 45 this._devicesUpdated(); |
43 }, | 46 }, |
44 | 47 |
45 _devicesUpdated: function() | 48 _devicesUpdated: function() |
46 { | 49 { |
47 if (this._muteUpdate) | 50 if (this._muteUpdate) |
48 return; | 51 return; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 * @return {boolean} | 252 * @return {boolean} |
250 */ | 253 */ |
251 function scaleValidator(item, index, input) | 254 function scaleValidator(item, index, input) |
252 { | 255 { |
253 return WebInspector.DeviceModeModel.deviceScaleFactorValidator(input
.value); | 256 return WebInspector.DeviceModeModel.deviceScaleFactorValidator(input
.value); |
254 } | 257 } |
255 }, | 258 }, |
256 | 259 |
257 __proto__: WebInspector.VBox.prototype | 260 __proto__: WebInspector.VBox.prototype |
258 }; | 261 }; |
OLD | NEW |