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

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

Issue 264046: Update browser actions api to be like new design doc. (Closed)
Patch Set: rebase Created 11 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
Index: chrome/browser/extensions/extension_browser_event_router.cc
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 36049422f161fa733d8bbbf535afbf1ed49fe349..9a0f14a84211b6eb149667f55cb213d93980f504 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -375,10 +375,14 @@ void ExtensionBrowserEventRouter::PageActionExecuted(
}
void ExtensionBrowserEventRouter::BrowserActionExecuted(
- Profile* profile, const std::string& extension_id, int window_id) {
- ListValue args;
- args.Append(Value::CreateIntegerValue(window_id));
+ Profile* profile, const std::string& extension_id, Browser* browser) {
+ TabContents* tab_contents = NULL;
+ int tab_id = 0;
+ if (!ExtensionTabUtil::GetDefaultTab(browser, &tab_contents, &tab_id))
+ return;
+ ListValue args;
+ args.Append(ExtensionTabUtil::CreateTabValue(tab_contents));
std::string json_args;
JSONWriter::Write(&args, false, &json_args);
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.h ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698