Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js b/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js |
| index 16f51444c17c05de24247a83761837575339a2d0..de1798edaa4c9c0bc4bbfed9b686b594e0837be1 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js |
| @@ -350,9 +350,15 @@ WebInspector.ContextMenu.prototype = { |
| return this._id++; |
| }, |
| - show: function() |
| + /** |
| + * @param {function()=} populatedCallback |
| + */ |
| + show: function(populatedCallback) |
|
dgozman
2016/05/18 23:05:31
Let's instead have ContextMenu.beforeShow(callback
|
| { |
| - Promise.all(this._pendingPromises).then(populateAndShow.bind(this)); |
| + Promise.all(this._pendingPromises) |
| + .then(populateAndShow.bind(this)) |
| + .then(populatedCallback) |
| + .then(this._innerShow.bind(this)); |
| WebInspector.ContextMenu._pendingMenu = this; |
| /** |
| @@ -379,7 +385,6 @@ WebInspector.ContextMenu.prototype = { |
| this._pendingPromises = []; |
| this._pendingTargets = []; |
| - this._innerShow(); |
| } |
| this._event.consume(true); |