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

Unified Diff: Source/devtools/front_end/ui/ActionRegistry.js

Issue 655273002: DevTools: zoom is broken in hosted mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed. Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/sources/SourcesPanel.js ('k') | Source/devtools/front_end/ui/ShortcutRegistry.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/ActionRegistry.js
diff --git a/Source/devtools/front_end/ui/ActionRegistry.js b/Source/devtools/front_end/ui/ActionRegistry.js
index 31d6149b3582ccff413d5ee211b75b2f0a652c95..646cb45b759a9ede4222ee9767ee6a1e1d895616 100644
--- a/Source/devtools/front_end/ui/ActionRegistry.js
+++ b/Source/devtools/front_end/ui/ActionRegistry.js
@@ -50,21 +50,21 @@ WebInspector.ActionRegistry.prototype = {
/**
* @param {string} actionId
- * @return {boolean}
+ * @return {!Promise.<boolean>}
*/
execute: function(actionId)
{
var extension = this._actionsById.get(actionId);
console.assert(extension, "No action found for actionId '" + actionId + "'");
- extension.instancePromise().then(handleAction).done();
- return !!extension;
+ return extension.instancePromise().then(handleAction);
/**
* @param {!Object} actionDelegate
+ * @return {boolean}
*/
function handleAction(actionDelegate)
{
- /** @type {!WebInspector.ActionDelegate} */(actionDelegate).handleAction(WebInspector.context);
+ return /** @type {!WebInspector.ActionDelegate} */(actionDelegate).handleAction(WebInspector.context);
}
}
}
@@ -79,7 +79,8 @@ WebInspector.ActionDelegate = function()
WebInspector.ActionDelegate.prototype = {
/**
* @param {!WebInspector.Context} context
- * @return {boolean}
+ * @return {boolean} True if handled. Note that lazily loaded modules won't be able to consume
+ * platform events from their actions.
*/
handleAction: function(context) {}
}
« no previous file with comments | « Source/devtools/front_end/sources/SourcesPanel.js ('k') | Source/devtools/front_end/ui/ShortcutRegistry.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698