Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementStatePaneWidget.js

Issue 2482593003: DevTools: eliminate ToolbarButton.setState method; cleanup toolbar.css (Closed)
Patch Set: kill ToolbarToggle.setActive() Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698