| 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 27 matching lines...) Expand all Loading... |
| 38 this._heightSetting.set(WebInspector.DeviceModeModel.MinDeviceSize); | 38 this._heightSetting.set(WebInspector.DeviceModeModel.MinDeviceSize); |
| 39 if (this._heightSetting.get() > WebInspector.DeviceModeModel.MaxDeviceSize) | 39 if (this._heightSetting.get() > WebInspector.DeviceModeModel.MaxDeviceSize) |
| 40 this._heightSetting.set(WebInspector.DeviceModeModel.MaxDeviceSize); | 40 this._heightSetting.set(WebInspector.DeviceModeModel.MaxDeviceSize); |
| 41 this._heightSetting.addChangeListener(this._heightSettingChanged, this); | 41 this._heightSetting.addChangeListener(this._heightSettingChanged, this); |
| 42 | 42 |
| 43 this._uaSetting = WebInspector.settings.createSetting("emulation.deviceUA",
WebInspector.DeviceModeModel.UA.Mobile); | 43 this._uaSetting = WebInspector.settings.createSetting("emulation.deviceUA",
WebInspector.DeviceModeModel.UA.Mobile); |
| 44 this._uaSetting.addChangeListener(this._uaSettingChanged, this); | 44 this._uaSetting.addChangeListener(this._uaSettingChanged, this); |
| 45 this._deviceScaleFactorSetting = WebInspector.settings.createSetting("emulat
ion.deviceScaleFactor", 0); | 45 this._deviceScaleFactorSetting = WebInspector.settings.createSetting("emulat
ion.deviceScaleFactor", 0); |
| 46 this._deviceScaleFactorSetting.addChangeListener(this._deviceScaleFactorSett
ingChanged, this); | 46 this._deviceScaleFactorSetting.addChangeListener(this._deviceScaleFactorSett
ingChanged, this); |
| 47 | 47 |
| 48 this._deviceOutlineSetting = WebInspector.settings.createSetting("emulation.
deviceOutline", true); | 48 this._deviceOutlineSetting = WebInspector.settings.createSetting("emulation.
deviceOutline", false); |
| 49 this._deviceOutlineSetting.addChangeListener(this._deviceOutlineSettingChang
ed, this); | 49 this._deviceOutlineSetting.addChangeListener(this._deviceOutlineSettingChang
ed, this); |
| 50 | 50 |
| 51 /** @type {!WebInspector.DeviceModeModel.Type} */ | 51 /** @type {!WebInspector.DeviceModeModel.Type} */ |
| 52 this._type = WebInspector.DeviceModeModel.Type.None; | 52 this._type = WebInspector.DeviceModeModel.Type.None; |
| 53 /** @type {?WebInspector.EmulatedDevice} */ | 53 /** @type {?WebInspector.EmulatedDevice} */ |
| 54 this._device = null; | 54 this._device = null; |
| 55 /** @type {?WebInspector.EmulatedDevice.Mode} */ | 55 /** @type {?WebInspector.EmulatedDevice.Mode} */ |
| 56 this._mode = null; | 56 this._mode = null; |
| 57 /** @type {number} */ | 57 /** @type {number} */ |
| 58 this._fitScale = 1; | 58 this._fitScale = 1; |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 /** | 587 /** |
| 588 * @param {boolean} touchEnabled | 588 * @param {boolean} touchEnabled |
| 589 * @param {boolean} mobile | 589 * @param {boolean} mobile |
| 590 */ | 590 */ |
| 591 _applyTouch: function(touchEnabled, mobile) | 591 _applyTouch: function(touchEnabled, mobile) |
| 592 { | 592 { |
| 593 WebInspector.MultitargetTouchModel.instance().setTouchEnabled(touchEnabl
ed, mobile); | 593 WebInspector.MultitargetTouchModel.instance().setTouchEnabled(touchEnabl
ed, mobile); |
| 594 } | 594 } |
| 595 } | 595 } |
| OLD | NEW |