OLD | NEW |
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 Loading... |
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 /** |
116 * @param {boolean} enabled | 123 * @param {boolean} enabled |
117 */ | 124 */ |
118 setEnabled(enabled) { | 125 setEnabled(enabled) { |
119 if (this._enabled === enabled) | 126 if (this._enabled === enabled) |
120 return; | 127 return; |
121 | 128 |
122 this._enabled = enabled; | 129 this._enabled = enabled; |
123 this.dispatchEventToListeners(WebInspector.Action.Events.Enabled, enabled); | 130 this.dispatchEventToListeners(WebInspector.Action.Events.Enabled, enabled); |
124 } | 131 } |
125 | 132 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 /** | 200 /** |
194 * @param {!WebInspector.Context} context | 201 * @param {!WebInspector.Context} context |
195 * @param {string} actionId | 202 * @param {string} actionId |
196 * @return {boolean} | 203 * @return {boolean} |
197 */ | 204 */ |
198 handleAction: function(context, actionId) {} | 205 handleAction: function(context, actionId) {} |
199 }; | 206 }; |
200 | 207 |
201 /** @type {!WebInspector.ActionRegistry} */ | 208 /** @type {!WebInspector.ActionRegistry} */ |
202 WebInspector.actionRegistry; | 209 WebInspector.actionRegistry; |
OLD | NEW |