Chromium Code Reviews| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 { | 145 { |
| 146 var device = /** @type {!WebInspector.EmulatedDevice} */ (item); | 146 var device = /** @type {!WebInspector.EmulatedDevice} */ (item); |
| 147 device.title = editor.control("title").value.trim(); | 147 device.title = editor.control("title").value.trim(); |
| 148 device.vertical.width = editor.control("width").value ? parseInt(editor. control("width").value, 10) : 0; | 148 device.vertical.width = editor.control("width").value ? parseInt(editor. control("width").value, 10) : 0; |
| 149 device.vertical.height = editor.control("height").value ? parseInt(edito r.control("height").value, 10) : 0; | 149 device.vertical.height = editor.control("height").value ? parseInt(edito r.control("height").value, 10) : 0; |
| 150 device.horizontal.width = device.vertical.height; | 150 device.horizontal.width = device.vertical.height; |
| 151 device.horizontal.height = device.vertical.width; | 151 device.horizontal.height = device.vertical.width; |
| 152 device.deviceScaleFactor = editor.control("scale").value ? parseFloat(ed itor.control("scale").value) : 0; | 152 device.deviceScaleFactor = editor.control("scale").value ? parseFloat(ed itor.control("scale").value) : 0; |
| 153 device.userAgent = editor.control("user-agent").value; | 153 device.userAgent = editor.control("user-agent").value; |
| 154 device.modes = []; | 154 device.modes = []; |
| 155 device.modes.push({title: "", orientation: WebInspector.EmulatedDevice.V ertical, insets: new Insets(0, 0, 0, 0), images: null}); | 155 device.modes.push({title: "", orientation: WebInspector.EmulatedDevice.V ertical, insets: new Insets(0, 0, 0, 0), image: null}); |
|
lushnikov
2016/03/04 05:06:58
nice!
| |
| 156 device.modes.push({title: "", orientation: WebInspector.EmulatedDevice.H orizontal, insets: new Insets(0, 0, 0, 0), images: null}); | 156 device.modes.push({title: "", orientation: WebInspector.EmulatedDevice.H orizontal, insets: new Insets(0, 0, 0, 0), image: null}); |
| 157 device.capabilities = []; | 157 device.capabilities = []; |
| 158 var uaType = editor.control("ua-type").value; | 158 var uaType = editor.control("ua-type").value; |
| 159 if (uaType === WebInspector.DeviceModeModel.UA.Mobile || uaType === WebI nspector.DeviceModeModel.UA.MobileNoTouch) | 159 if (uaType === WebInspector.DeviceModeModel.UA.Mobile || uaType === WebI nspector.DeviceModeModel.UA.MobileNoTouch) |
| 160 device.capabilities.push(WebInspector.EmulatedDevice.Capability.Mobi le); | 160 device.capabilities.push(WebInspector.EmulatedDevice.Capability.Mobi le); |
| 161 if (uaType === WebInspector.DeviceModeModel.UA.Mobile || uaType === WebI nspector.DeviceModeModel.UA.DesktopTouch) | 161 if (uaType === WebInspector.DeviceModeModel.UA.Mobile || uaType === WebI nspector.DeviceModeModel.UA.DesktopTouch) |
| 162 device.capabilities.push(WebInspector.EmulatedDevice.Capability.Touc h); | 162 device.capabilities.push(WebInspector.EmulatedDevice.Capability.Touc h); |
| 163 if (isNew) | 163 if (isNew) |
| 164 this._emulatedDevicesList.addCustomDevice(device); | 164 this._emulatedDevicesList.addCustomDevice(device); |
| 165 else | 165 else |
| 166 this._emulatedDevicesList.saveCustomDevices(); | 166 this._emulatedDevicesList.saveCustomDevices(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |