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); |