| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @param {!WebInspector.DeviceModeModel} model | 6 * @param {!WebInspector.DeviceModeModel} model |
| 7 * @param {!WebInspector.Setting} showMediaInspectorSetting | 7 * @param {!WebInspector.Setting} showMediaInspectorSetting |
| 8 * @param {!WebInspector.Setting} showRulersSetting | 8 * @param {!WebInspector.Setting} showRulersSetting |
| 9 * @constructor | 9 * @constructor |
| 10 */ | 10 */ |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 * @param {number} value | 234 * @param {number} value |
| 235 */ | 235 */ |
| 236 function appendDeviceScaleFactorItem(title, value) | 236 function appendDeviceScaleFactorItem(title, value) |
| 237 { | 237 { |
| 238 deviceScaleFactorSubmenu.appendCheckboxItem(title, deviceScaleFactor
Setting.set.bind(deviceScaleFactorSetting, value), deviceScaleFactorValue === va
lue, deviceScaleFactorDisabled); | 238 deviceScaleFactorSubmenu.appendCheckboxItem(title, deviceScaleFactor
Setting.set.bind(deviceScaleFactorSetting, value), deviceScaleFactorValue === va
lue, deviceScaleFactorDisabled); |
| 239 } | 239 } |
| 240 | 240 |
| 241 contextMenu.appendItem(WebInspector.UIString("Reset to defaults"), this.
_model.reset.bind(this._model), this._model.type() !== WebInspector.DeviceModeMo
del.Type.Responsive); | 241 contextMenu.appendItem(WebInspector.UIString("Reset to defaults"), this.
_model.reset.bind(this._model), this._model.type() !== WebInspector.DeviceModeMo
del.Type.Responsive); |
| 242 contextMenu.appendSeparator(); | 242 contextMenu.appendSeparator(); |
| 243 | 243 |
| 244 var deviceOutlineSetting = this._model.deviceOutlineSetting(); |
| 245 contextMenu.appendCheckboxItem(WebInspector.UIString("Show device frame
if available"), deviceOutlineSetting.set.bind(deviceOutlineSetting, !deviceOutli
neSetting.get()), deviceOutlineSetting.get(), this._model.type() !== WebInspecto
r.DeviceModeModel.Type.Device); |
| 244 contextMenu.appendCheckboxItem(WebInspector.UIString("Show media queries
"), this._toggleMediaInspector.bind(this), this._showMediaInspectorSetting.get()
, this._model.type() === WebInspector.DeviceModeModel.Type.None); | 246 contextMenu.appendCheckboxItem(WebInspector.UIString("Show media queries
"), this._toggleMediaInspector.bind(this), this._showMediaInspectorSetting.get()
, this._model.type() === WebInspector.DeviceModeModel.Type.None); |
| 245 contextMenu.appendCheckboxItem(WebInspector.UIString("Show rulers"), thi
s._toggleRulers.bind(this), this._showRulersSetting.get(), this._model.type() ==
= WebInspector.DeviceModeModel.Type.None); | 247 contextMenu.appendCheckboxItem(WebInspector.UIString("Show rulers"), thi
s._toggleRulers.bind(this), this._showRulersSetting.get(), this._model.type() ==
= WebInspector.DeviceModeModel.Type.None); |
| 246 contextMenu.appendItem(WebInspector.UIString("Configure network\u2026"),
this._openNetworkConfig.bind(this), false); | 248 contextMenu.appendItem(WebInspector.UIString("Configure network\u2026"),
this._openNetworkConfig.bind(this), false); |
| 247 contextMenu.appendItemsAtLocation("deviceModeMenu"); | 249 contextMenu.appendItemsAtLocation("deviceModeMenu"); |
| 248 }, | 250 }, |
| 249 | 251 |
| 250 _toggleMediaInspector: function() | 252 _toggleMediaInspector: function() |
| 251 { | 253 { |
| 252 this._showMediaInspectorSetting.set(!this._showMediaInspectorSetting.get
()); | 254 this._showMediaInspectorSetting.set(!this._showMediaInspectorSetting.get
()); |
| 253 }, | 255 }, |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 this._emulateDevice(device); | 512 this._emulateDevice(device); |
| 511 return; | 513 return; |
| 512 } | 514 } |
| 513 } | 515 } |
| 514 } | 516 } |
| 515 } | 517 } |
| 516 | 518 |
| 517 this._model.emulate(WebInspector.DeviceModeModel.Type.Responsive, null,
null); | 519 this._model.emulate(WebInspector.DeviceModeModel.Type.Responsive, null,
null); |
| 518 } | 520 } |
| 519 } | 521 } |
| OLD | NEW |