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

Unified Diff: chrome/browser/extensions/extension_browser_event_router.cc

Issue 9402018: Experimental Extension Keybinding (first cut). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
Index: chrome/browser/extensions/extension_browser_event_router.cc
===================================================================
--- chrome/browser/extensions/extension_browser_event_router.cc (revision 123221)
+++ chrome/browser/extensions/extension_browser_event_router.cc (working copy)
@@ -653,3 +653,18 @@
DispatchEventWithTab(profile, extension_id, "browserAction.onClicked",
tab_contents->web_contents(), true);
}
+
+void ExtensionBrowserEventRouter::CommandExecuted(
+ Profile* profile,
+ const std::string& extension_id,
+ const std::string& command) {
+ ListValue args;
+ args.Append(Value::CreateStringValue(command));
+ std::string json_args;
+ base::JSONWriter::Write(&args, false, &json_args);
+
+ DispatchEventToExtension(profile,
+ extension_id,
+ "experimental.keybinding.onCommand",
+ json_args);
+}
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.h ('k') | chrome/browser/extensions/extension_keybinding_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698