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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 toolbar.appendToolbarItem(this._uaItem); | 163 toolbar.appendToolbarItem(this._uaItem); |
164 } | 164 } |
165 | 165 |
166 /** | 166 /** |
167 * @param {!UI.Toolbar} toolbar | 167 * @param {!UI.Toolbar} toolbar |
168 */ | 168 */ |
169 _fillModeToolbar(toolbar) { | 169 _fillModeToolbar(toolbar) { |
170 toolbar.appendToolbarItem( | 170 toolbar.appendToolbarItem( |
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('click', this._modeMenuClicked, 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 = Components.NetworkConditionsSelector.createToo
lbarMenuButton(); |
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')); |
(...skipping 397 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 |