| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |