| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 WebInspector.ElementStatePaneWidget = class extends WebInspector.Widget { | 7 WebInspector.ElementStatePaneWidget = class extends WebInspector.Widget { |
| 8 constructor() { | 8 constructor() { |
| 9 super(); | 9 super(); |
| 10 this.element.className = 'styles-element-state-pane'; | 10 this.element.className = 'styles-element-state-pane'; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 /** | 103 /** |
| 104 * @implements {WebInspector.ToolbarItem.Provider} | 104 * @implements {WebInspector.ToolbarItem.Provider} |
| 105 * @unrestricted | 105 * @unrestricted |
| 106 */ | 106 */ |
| 107 WebInspector.ElementStatePaneWidget.ButtonProvider = class { | 107 WebInspector.ElementStatePaneWidget.ButtonProvider = class { |
| 108 constructor() { | 108 constructor() { |
| 109 this._button = new WebInspector.ToolbarToggle( | 109 this._button = new WebInspector.ToolbarToggle( |
| 110 WebInspector.UIString('Toggle Element State'), '', WebInspector.UIString
(':hov')); | 110 WebInspector.UIString('Toggle Element State'), ''); |
| 111 this._button.setText(WebInspector.UIString(':hov')); |
| 111 this._button.addEventListener('click', this._clicked, this); | 112 this._button.addEventListener('click', this._clicked, this); |
| 112 this._button.element.classList.add('monospace'); | 113 this._button.element.classList.add('monospace'); |
| 113 this._view = new WebInspector.ElementStatePaneWidget(); | 114 this._view = new WebInspector.ElementStatePaneWidget(); |
| 114 } | 115 } |
| 115 | 116 |
| 116 _clicked() { | 117 _clicked() { |
| 117 WebInspector.ElementsPanel.instance().showToolbarPane(!this._view.isShowing(
) ? this._view : null, this._button); | 118 WebInspector.ElementsPanel.instance().showToolbarPane(!this._view.isShowing(
) ? this._view : null, this._button); |
| 118 } | 119 } |
| 119 | 120 |
| 120 /** | 121 /** |
| 121 * @override | 122 * @override |
| 122 * @return {!WebInspector.ToolbarItem} | 123 * @return {!WebInspector.ToolbarItem} |
| 123 */ | 124 */ |
| 124 item() { | 125 item() { |
| 125 return this._button; | 126 return this._button; |
| 126 } | 127 } |
| 127 }; | 128 }; |
| OLD | NEW |