| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 this._wrapToolbarItem(createElementWithClass('div', 'device-mode-empty-t
oolbar-element'))); | 181 this._wrapToolbarItem(createElementWithClass('div', 'device-mode-empty-t
oolbar-element'))); |
| 182 this._modeButton = new UI.ToolbarButton('', 'largeicon-rotate-screen'); | 182 this._modeButton = new UI.ToolbarButton('', 'largeicon-rotate-screen'); |
| 183 this._modeButton.addEventListener(UI.ToolbarButton.Events.Click, this._modeM
enuClicked, this); | 183 this._modeButton.addEventListener(UI.ToolbarButton.Events.Click, this._modeM
enuClicked, this); |
| 184 toolbar.appendToolbarItem(this._modeButton); | 184 toolbar.appendToolbarItem(this._modeButton); |
| 185 } | 185 } |
| 186 | 186 |
| 187 /** | 187 /** |
| 188 * @param {!UI.Toolbar} toolbar | 188 * @param {!UI.Toolbar} toolbar |
| 189 */ | 189 */ |
| 190 _fillOptionsToolbar(toolbar) { | 190 _fillOptionsToolbar(toolbar) { |
| 191 this._networkConditionsItem = NetworkConditions.NetworkConditionsSelector.cr
eateToolbarMenuButton(); | 191 this._networkConditionsItem = MobileThrottling.NetworkConditionsSelector.cre
ateToolbarMenuButton(); |
| 192 this._networkConditionsItem.setVisible(this._showNetworkConditionsSetting.ge
t()); | 192 this._networkConditionsItem.setVisible(this._showNetworkConditionsSetting.ge
t()); |
| 193 this._networkConditionsItem.setTitle(Common.UIString('Network throttling')); | 193 this._networkConditionsItem.setTitle(Common.UIString('Network throttling')); |
| 194 this._networkConditionsItem.element.style.maxWidth = '140px'; | 194 this._networkConditionsItem.element.style.maxWidth = '140px'; |
| 195 toolbar.appendToolbarItem(this._networkConditionsItem); | 195 toolbar.appendToolbarItem(this._networkConditionsItem); |
| 196 | 196 |
| 197 var moreOptionsButton = new UI.ToolbarMenuButton(this._appendOptionsMenuItem
s.bind(this)); | 197 var moreOptionsButton = new UI.ToolbarMenuButton(this._appendOptionsMenuItem
s.bind(this)); |
| 198 moreOptionsButton.setTitle(Common.UIString('More options')); | 198 moreOptionsButton.setTitle(Common.UIString('More options')); |
| 199 toolbar.appendToolbarItem(moreOptionsButton); | 199 toolbar.appendToolbarItem(moreOptionsButton); |
| 200 | 200 |
| 201 toolbar.appendToolbarItem( | 201 toolbar.appendToolbarItem( |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 this._emulateDevice(device); | 590 this._emulateDevice(device); |
| 591 return; | 591 return; |
| 592 } | 592 } |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 | 596 |
| 597 this._model.emulate(Emulation.DeviceModeModel.Type.Responsive, null, null); | 597 this._model.emulate(Emulation.DeviceModeModel.Type.Responsive, null, null); |
| 598 } | 598 } |
| 599 }; | 599 }; |
| OLD | NEW |