| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 * @param {!WebInspector.Target} target | 370 * @param {!WebInspector.Target} target |
| 371 */ | 371 */ |
| 372 targetRemoved: function(target) | 372 targetRemoved: function(target) |
| 373 { | 373 { |
| 374 if (this._target === target) | 374 if (this._target === target) |
| 375 this._target = null; | 375 this._target = null; |
| 376 }, | 376 }, |
| 377 | 377 |
| 378 _scaleSettingChanged: function() | 378 _scaleSettingChanged: function() |
| 379 { | 379 { |
| 380 this._calculateAndEmulate(true); | 380 this._calculateAndEmulate(false); |
| 381 }, | 381 }, |
| 382 | 382 |
| 383 _widthSettingChanged: function() | 383 _widthSettingChanged: function() |
| 384 { | 384 { |
| 385 this._calculateAndEmulate(false); | 385 this._calculateAndEmulate(false); |
| 386 }, | 386 }, |
| 387 | 387 |
| 388 _heightSettingChanged: function() | 388 _heightSettingChanged: function() |
| 389 { | 389 { |
| 390 this._calculateAndEmulate(false); | 390 this._calculateAndEmulate(false); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 if (!this._target || orientation === this._screenOrientation) | 611 if (!this._target || orientation === this._screenOrientation) |
| 612 return; | 612 return; |
| 613 | 613 |
| 614 this._screenOrientation = orientation; | 614 this._screenOrientation = orientation; |
| 615 if (!this._screenOrientation) | 615 if (!this._screenOrientation) |
| 616 this._target.screenOrientationAgent().clearScreenOrientationOverride
(); | 616 this._target.screenOrientationAgent().clearScreenOrientationOverride
(); |
| 617 else | 617 else |
| 618 this._target.screenOrientationAgent().setScreenOrientationOverride(t
his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient
ationAgent.OrientationType} */ (this._screenOrientation)); | 618 this._target.screenOrientationAgent().setScreenOrientationOverride(t
his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient
ationAgent.OrientationType} */ (this._screenOrientation)); |
| 619 } | 619 } |
| 620 } | 620 } |
| OLD | NEW |