| 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Emulation.DeviceModeToolbar = class { | 7 Emulation.DeviceModeToolbar = class { |
| 8 /** | 8 /** |
| 9 * @param {!Emulation.DeviceModeModel} model | 9 * @param {!Emulation.DeviceModeModel} model |
| 10 * @param {!Common.Setting} showMediaInspectorSetting | 10 * @param {!Common.Setting} showMediaInspectorSetting |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 this._wrapToolbarItem(createElementWithClass('div', 'device-mode-empty-t
oolbar-element'))); | 171 this._wrapToolbarItem(createElementWithClass('div', 'device-mode-empty-t
oolbar-element'))); |
| 172 this._modeButton = new UI.ToolbarButton('', 'largeicon-rotate-screen'); | 172 this._modeButton = new UI.ToolbarButton('', 'largeicon-rotate-screen'); |
| 173 this._modeButton.addEventListener(UI.ToolbarButton.Events.Click, this._modeM
enuClicked, this); | 173 this._modeButton.addEventListener(UI.ToolbarButton.Events.Click, this._modeM
enuClicked, this); |
| 174 toolbar.appendToolbarItem(this._modeButton); | 174 toolbar.appendToolbarItem(this._modeButton); |
| 175 } | 175 } |
| 176 | 176 |
| 177 /** | 177 /** |
| 178 * @param {!UI.Toolbar} toolbar | 178 * @param {!UI.Toolbar} toolbar |
| 179 */ | 179 */ |
| 180 _fillOptionsToolbar(toolbar) { | 180 _fillOptionsToolbar(toolbar) { |
| 181 this._networkConditionsItem = Components.NetworkConditionsSelector.createToo
lbarMenuButton(); | 181 this._networkConditionsItem = NetworkConditions.NetworkConditionsSelector.cr
eateToolbarMenuButton(); |
| 182 this._networkConditionsItem.setVisible(this._showNetworkConditionsSetting.ge
t()); | 182 this._networkConditionsItem.setVisible(this._showNetworkConditionsSetting.ge
t()); |
| 183 this._networkConditionsItem.setTitle(Common.UIString('Network throttling')); | 183 this._networkConditionsItem.setTitle(Common.UIString('Network throttling')); |
| 184 this._networkConditionsItem.element.style.padding = '0 5px'; | 184 this._networkConditionsItem.element.style.padding = '0 5px'; |
| 185 this._networkConditionsItem.element.style.maxWidth = '140px'; | 185 this._networkConditionsItem.element.style.maxWidth = '140px'; |
| 186 toolbar.appendToolbarItem(this._networkConditionsItem); | 186 toolbar.appendToolbarItem(this._networkConditionsItem); |
| 187 | 187 |
| 188 var moreOptionsButton = new UI.ToolbarMenuButton(this._appendOptionsMenuItem
s.bind(this)); | 188 var moreOptionsButton = new UI.ToolbarMenuButton(this._appendOptionsMenuItem
s.bind(this)); |
| 189 moreOptionsButton.setTitle(Common.UIString('More options')); | 189 moreOptionsButton.setTitle(Common.UIString('More options')); |
| 190 toolbar.appendToolbarItem(moreOptionsButton); | 190 toolbar.appendToolbarItem(moreOptionsButton); |
| 191 | 191 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 this._emulateDevice(device); | 581 this._emulateDevice(device); |
| 582 return; | 582 return; |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 } | 586 } |
| 587 | 587 |
| 588 this._model.emulate(Emulation.DeviceModeModel.Type.Responsive, null, null); | 588 this._model.emulate(Emulation.DeviceModeModel.Type.Responsive, null, null); |
| 589 } | 589 } |
| 590 }; | 590 }; |
| OLD | NEW |