summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browser_event_router.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_browser_event_router.cc')
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 3604942..9a0f14a 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);