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 4a1888e7956c964ef4e09730594c2895514740cd..c63f623e5a3c2836019e27b7c311a23c49ffe4dd 100644 |
| --- a/Source/devtools/front_end/ui/Toolbar.js |
| +++ b/Source/devtools/front_end/ui/Toolbar.js |
| @@ -404,7 +404,21 @@ WebInspector.ToolbarButtonBase.prototype = { |
| setAction: function(actionId) |
| { |
| this._actionId = actionId; |
| - WebInspector.Tooltip.install(this.element, this._title, undefined, this._actionId); |
| + this._updateTooltip(); |
| + }, |
| + |
| + /** |
| + * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys |
| + */ |
| + setShortcut: function(keys) |
| + { |
| + this._shortcutKeys = keys; |
|
pfeldman
2015/08/11 05:34:56
We should have action ids for everything with the
samli
2015/08/11 07:17:01
Done.
|
| + this._updateTooltip(); |
| + }, |
| + |
| + _updateTooltip: function() |
| + { |
| + WebInspector.Tooltip.install(this.element, this._title, undefined, this._actionId, this._shortcutKeys); |
| }, |
| /** |
| @@ -440,7 +454,7 @@ WebInspector.ToolbarButtonBase.prototype = { |
| if (this._title === title) |
| return; |
| this._title = title; |
| - WebInspector.Tooltip.install(this.element, title, undefined, this._actionId); |
| + this._updateTooltip(); |
| }, |
| /** |