| 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 * @param {function()} updateCallback | 7 * @param {function()} updateCallback |
| 8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 9 */ | 9 */ |
| 10 WebInspector.DeviceModeModel = function(updateCallback) | 10 WebInspector.DeviceModeModel = function(updateCallback) |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 /** | 354 /** |
| 355 * @override | 355 * @override |
| 356 * @param {!WebInspector.Target} target | 356 * @param {!WebInspector.Target} target |
| 357 */ | 357 */ |
| 358 targetRemoved: function(target) | 358 targetRemoved: function(target) |
| 359 { | 359 { |
| 360 if (this._target === target) | 360 if (this._target === target) |
| 361 this._target = null; | 361 this._target = null; |
| 362 }, | 362 }, |
| 363 | 363 |
| 364 requestAppBanner: function() |
| 365 { |
| 366 this._target.pageAgent().requestAppBanner(); |
| 367 }, |
| 368 |
| 364 _scaleSettingChanged: function() | 369 _scaleSettingChanged: function() |
| 365 { | 370 { |
| 366 this._calculateAndEmulate(true); | 371 this._calculateAndEmulate(true); |
| 367 }, | 372 }, |
| 368 | 373 |
| 369 _widthSettingChanged: function() | 374 _widthSettingChanged: function() |
| 370 { | 375 { |
| 371 this._calculateAndEmulate(false); | 376 this._calculateAndEmulate(false); |
| 372 }, | 377 }, |
| 373 | 378 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 if (!this._target || orientation === this._screenOrientation) | 602 if (!this._target || orientation === this._screenOrientation) |
| 598 return; | 603 return; |
| 599 | 604 |
| 600 this._screenOrientation = orientation; | 605 this._screenOrientation = orientation; |
| 601 if (!this._screenOrientation) | 606 if (!this._screenOrientation) |
| 602 this._target.screenOrientationAgent().clearScreenOrientationOverride
(); | 607 this._target.screenOrientationAgent().clearScreenOrientationOverride
(); |
| 603 else | 608 else |
| 604 this._target.screenOrientationAgent().setScreenOrientationOverride(t
his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient
ationAgent.OrientationType} */ (this._screenOrientation)); | 609 this._target.screenOrientationAgent().setScreenOrientationOverride(t
his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient
ationAgent.OrientationType} */ (this._screenOrientation)); |
| 605 } | 610 } |
| 606 } | 611 } |
| OLD | NEW |