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

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

Issue 1688113002: Devtools: Add device frames to device mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 */ 7 */
8 WebInspector.EmulatedDevice = function() 8 WebInspector.EmulatedDevice = function()
9 { 9 {
10 /** @type {string} */ 10 /** @type {string} */
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 modeImage: function(mode) 300 modeImage: function(mode)
301 { 301 {
302 if (!mode.image) 302 if (!mode.image)
303 return ""; 303 return "";
304 if (!this._extension) 304 if (!this._extension)
305 return mode.image; 305 return mode.image;
306 return this._extension.module().substituteURL(mode.image); 306 return this._extension.module().substituteURL(mode.image);
307 }, 307 },
308 308
309 /** 309 /**
310 * @param {string} orientationName
311 * @return {string}
312 */
313 outlineImage: function(orientationName)
314 {
315 var orientation = this.orientationByName(orientationName);
316 if (!orientation.outlineImage)
317 return "";
318 if (!this._extension)
319 return orientation.outlineImage;
320 return this._extension.module().substituteURL(orientation.outlineImage);
321 },
322
323 /**
310 * @param {string} name 324 * @param {string} name
311 * @return {!WebInspector.EmulatedDevice.Orientation} 325 * @return {!WebInspector.EmulatedDevice.Orientation}
312 */ 326 */
313 orientationByName: function(name) 327 orientationByName: function(name)
314 { 328 {
315 return name === WebInspector.EmulatedDevice.Vertical ? this.vertical : t his.horizontal; 329 return name === WebInspector.EmulatedDevice.Vertical ? this.vertical : t his.horizontal;
316 }, 330 },
317 331
318 /** 332 /**
319 * @return {boolean} 333 * @return {boolean}
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 519
506 /** 520 /**
507 * @return {!WebInspector.EmulatedDevicesList} 521 * @return {!WebInspector.EmulatedDevicesList}
508 */ 522 */
509 WebInspector.EmulatedDevicesList.instance = function() 523 WebInspector.EmulatedDevicesList.instance = function()
510 { 524 {
511 if (!WebInspector.EmulatedDevicesList._instance) 525 if (!WebInspector.EmulatedDevicesList._instance)
512 WebInspector.EmulatedDevicesList._instance = new WebInspector.EmulatedDe vicesList(); 526 WebInspector.EmulatedDevicesList._instance = new WebInspector.EmulatedDe vicesList();
513 return /** @type {!WebInspector.EmulatedDevicesList} */ (WebInspector.Emulat edDevicesList._instance); 527 return /** @type {!WebInspector.EmulatedDevicesList} */ (WebInspector.Emulat edDevicesList._instance);
514 } 528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698