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

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

Issue 10829186: Tabs API is usable without tabs permission. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 4 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/browser_event_router.cc
diff --git a/chrome/browser/extensions/browser_event_router.cc b/chrome/browser/extensions/browser_event_router.cc
index 83347cbb9acf9f55ff020429fed77b14604b7692..62672aef11947f6d73f5c03170f5471e81f44c20 100644
--- a/chrome/browser/extensions/browser_event_router.cc
+++ b/chrome/browser/extensions/browser_event_router.cc
@@ -390,7 +390,9 @@ void BrowserEventRouter::DispatchEventWithTab(
scoped_ptr<ListValue> args(new ListValue());
args->Append(ExtensionTabUtil::CreateTabValueActive(
- web_contents, active));
+ web_contents,
+ active,
+ profile->GetExtensionService()->extensions()->GetByID(extension_id)));
if (!extension_id.empty()) {
DispatchEventToExtension(profile, extension_id, event_name, args.Pass(),
user_gesture);
@@ -427,9 +429,9 @@ void BrowserEventRouter::DispatchTabUpdatedEvent(
args->Append(changed_properties);
// Third arg: An object containing the state of the tab.
- args->Append(ExtensionTabUtil::CreateTabValue(contents));
-
Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
+ args->Append(ExtensionTabUtil::CreateTabValue(contents, NULL /*extension*/));
+
DispatchEvent(profile, events::kOnTabUpdated, args.Pass(),
EventRouter::USER_GESTURE_UNKNOWN);
}

Powered by Google App Engine
This is Rietveld 408576698