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