Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DevicesSettingsTab.js

Issue 1761243002: [DevTools] Fix compile errors before closure compiler roll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prepare-bindings-module
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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});
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698