| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 /** @enum {string} */ | 70 /** @enum {string} */ |
| 71 WebInspector.DeviceModeModel.Type = { | 71 WebInspector.DeviceModeModel.Type = { |
| 72 None: "None", | 72 None: "None", |
| 73 Responsive: "Responsive", | 73 Responsive: "Responsive", |
| 74 Device: "Device" | 74 Device: "Device" |
| 75 } | 75 } |
| 76 | 76 |
| 77 /** @enum {string} */ | 77 /** @enum {string} */ |
| 78 WebInspector.DeviceModeModel.UA = { | 78 WebInspector.DeviceModeModel.UA = { |
| 79 Mobile: "Mobile", | 79 Mobile: WebInspector.UIString("Mobile"), |
| 80 MobileNoTouch: "MobileNoTouch", | 80 MobileNoTouch: WebInspector.UIString("Mobile (no touch)"), |
| 81 Desktop: "Desktop", | 81 Desktop: WebInspector.UIString("Desktop"), |
| 82 DesktopTouch: "DesktopTouch" | 82 DesktopTouch: WebInspector.UIString("Desktop (touch)") |
| 83 } | 83 } |
| 84 | 84 |
| 85 WebInspector.DeviceModeModel.MinDeviceSize = 50; | 85 WebInspector.DeviceModeModel.MinDeviceSize = 50; |
| 86 WebInspector.DeviceModeModel.MaxDeviceSize = 9999; | 86 WebInspector.DeviceModeModel.MaxDeviceSize = 9999; |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * @param {string} value | 89 * @param {string} value |
| 90 * @return {boolean} | 90 * @return {boolean} |
| 91 */ | 91 */ |
| 92 WebInspector.DeviceModeModel.deviceSizeValidator = function(value) | 92 WebInspector.DeviceModeModel.deviceSizeValidator = function(value) |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 if (!this._target || orientation === this._screenOrientation) | 624 if (!this._target || orientation === this._screenOrientation) |
| 625 return; | 625 return; |
| 626 | 626 |
| 627 this._screenOrientation = orientation; | 627 this._screenOrientation = orientation; |
| 628 if (!this._screenOrientation) | 628 if (!this._screenOrientation) |
| 629 this._target.screenOrientationAgent().clearScreenOrientationOverride
(); | 629 this._target.screenOrientationAgent().clearScreenOrientationOverride
(); |
| 630 else | 630 else |
| 631 this._target.screenOrientationAgent().setScreenOrientationOverride(t
his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient
ationAgent.OrientationType} */ (this._screenOrientation)); | 631 this._target.screenOrientationAgent().setScreenOrientationOverride(t
his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient
ationAgent.OrientationType} */ (this._screenOrientation)); |
| 632 } | 632 } |
| 633 } | 633 } |
| OLD | NEW |