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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/ActionRegistry.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.ActionRegistry = class { 7 WebInspector.ActionRegistry = class {
8 constructor() { 8 constructor() {
9 /** @type {!Map.<string, !WebInspector.Action>} */ 9 /** @type {!Map.<string, !WebInspector.Action>} */
10 this._actionsById = new Map(); 10 this._actionsById = new Map();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 /** 108 /**
109 * @return {string} 109 * @return {string}
110 */ 110 */
111 icon() { 111 icon() {
112 return this._extension.descriptor()['iconClass'] || ''; 112 return this._extension.descriptor()['iconClass'] || '';
113 } 113 }
114 114
115 /** 115 /**
116 * @return {string}
117 */
118 toggledIcon() {
119 return this._extension.descriptor()['toggledIconClass'] || '';
120 }
121
122 /**
123 * @return {boolean}
124 */
125 toggleWithRedColor() {
126 return !!this._extension.descriptor()['toggleWithRedColor'];
127 }
128
129 /**
116 * @param {boolean} enabled 130 * @param {boolean} enabled
117 */ 131 */
118 setEnabled(enabled) { 132 setEnabled(enabled) {
119 if (this._enabled === enabled) 133 if (this._enabled === enabled)
120 return; 134 return;
121 135
122 this._enabled = enabled; 136 this._enabled = enabled;
123 this.dispatchEventToListeners(WebInspector.Action.Events.Enabled, enabled); 137 this.dispatchEventToListeners(WebInspector.Action.Events.Enabled, enabled);
124 } 138 }
125 139
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 /** 207 /**
194 * @param {!WebInspector.Context} context 208 * @param {!WebInspector.Context} context
195 * @param {string} actionId 209 * @param {string} actionId
196 * @return {boolean} 210 * @return {boolean}
197 */ 211 */
198 handleAction: function(context, actionId) {} 212 handleAction: function(context, actionId) {}
199 }; 213 };
200 214
201 /** @type {!WebInspector.ActionRegistry} */ 215 /** @type {!WebInspector.ActionRegistry} */
202 WebInspector.actionRegistry; 216 WebInspector.actionRegistry;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698