| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 rightContainer.createChild("div", "device-mode-toolbar-spacer"); | 49 rightContainer.createChild("div", "device-mode-toolbar-spacer"); |
| 50 var optionsToolbar = new WebInspector.Toolbar("", rightContainer); | 50 var optionsToolbar = new WebInspector.Toolbar("", rightContainer); |
| 51 optionsToolbar.makeWrappable(true); | 51 optionsToolbar.makeWrappable(true); |
| 52 this._fillOptionsToolbar(optionsToolbar); | 52 this._fillOptionsToolbar(optionsToolbar); |
| 53 | 53 |
| 54 this._emulatedDevicesList = WebInspector.EmulatedDevicesList.instance(); | 54 this._emulatedDevicesList = WebInspector.EmulatedDevicesList.instance(); |
| 55 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.CustomDevicesUpdated, this._deviceListChanged, this); | 55 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.CustomDevicesUpdated, this._deviceListChanged, this); |
| 56 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.StandardDevicesUpdated, this._deviceListChanged, this); | 56 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList.
Events.StandardDevicesUpdated, this._deviceListChanged, this); |
| 57 | 57 |
| 58 this._persistenceSetting = WebInspector.settings.createSetting("emulation.de
viceModeValue", {device: "", orientation: "", mode: ""}); | 58 this._persistenceSetting = WebInspector.settings.createSetting("emulation.de
viceModeValue", {device: "", orientation: "", mode: ""}); |
| 59 } | 59 }; |
| 60 | 60 |
| 61 WebInspector.DeviceModeToolbar.prototype = { | 61 WebInspector.DeviceModeToolbar.prototype = { |
| 62 /** | 62 /** |
| 63 * @param {!WebInspector.Toolbar} toolbar | 63 * @param {!WebInspector.Toolbar} toolbar |
| 64 */ | 64 */ |
| 65 _fillLeftToolbar: function(toolbar) | 65 _fillLeftToolbar: function(toolbar) |
| 66 { | 66 { |
| 67 toolbar.appendToolbarItem(this._wrapToolbarItem(createElementWithClass("
div", "device-mode-empty-toolbar-element"))); | 67 toolbar.appendToolbarItem(this._wrapToolbarItem(createElementWithClass("
div", "device-mode-empty-toolbar-element"))); |
| 68 this._deviceSelectItem = new WebInspector.ToolbarMenuButton(this._append
DeviceMenuItems.bind(this)); | 68 this._deviceSelectItem = new WebInspector.ToolbarMenuButton(this._append
DeviceMenuItems.bind(this)); |
| 69 this._deviceSelectItem.setGlyph(""); | 69 this._deviceSelectItem.setGlyph(""); |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 this._lastMode.set(device, mode); | 564 this._lastMode.set(device, mode); |
| 565 this._emulateDevice(device); | 565 this._emulateDevice(device); |
| 566 return; | 566 return; |
| 567 } | 567 } |
| 568 } | 568 } |
| 569 } | 569 } |
| 570 } | 570 } |
| 571 | 571 |
| 572 this._model.emulate(WebInspector.DeviceModeModel.Type.Responsive, null,
null); | 572 this._model.emulate(WebInspector.DeviceModeModel.Type.Responsive, null,
null); |
| 573 } | 573 } |
| 574 } | 574 }; |
| OLD | NEW |