Chromium Code Reviews| Index: Source/devtools/front_end/ui/Toolbar.js |
| diff --git a/Source/devtools/front_end/ui/Toolbar.js b/Source/devtools/front_end/ui/Toolbar.js |
| index 39bce5a2139a301130966f7f5253814ec38ad264..6bd8aff9076fbd6b079ad1699964807b25b8f181 100644 |
| --- a/Source/devtools/front_end/ui/Toolbar.js |
| +++ b/Source/devtools/front_end/ui/Toolbar.js |
| @@ -666,6 +666,18 @@ WebInspector.ToolbarButton.prototype = { |
| } |
| /** |
| + * @param {string} actionId |
| + * @return {!WebInspector.ToolbarButton} |
| + */ |
| +WebInspector.ToolbarButton.createActionButton = function(actionId) |
| +{ |
| + var action = WebInspector.actionRegistry.getActionDescriptor(actionId); |
|
pfeldman
2015/08/18 05:08:31
I would expose actionTitle and actionIcon by id in
samli
2015/08/19 05:27:15
Done.
|
| + var button = new WebInspector.ToolbarButton(action["title"] || "", action["iconClass"]); |
| + button.setAction(actionId); |
| + return button; |
| +} |
| + |
| +/** |
| * @constructor |
| * @extends {WebInspector.ToolbarButton} |
| * @param {string} title |