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

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

Issue 11368145: Lazy-creates BluetoothAdapter in ExtensionBluetoothEventRouter (EBEE). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use GetMutableAdapter Created 8 years, 1 month 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/event_router.cc
diff --git a/chrome/browser/extensions/event_router.cc b/chrome/browser/extensions/event_router.cc
index 19358599082197068e2d0980d61036990b53080b..17b9375188bb716304e199a8c1b6c0786001598f 100644
--- a/chrome/browser/extensions/event_router.cc
+++ b/chrome/browser/extensions/event_router.cc
@@ -198,6 +198,9 @@ void EventRouter::OnListenerAdded(const EventListener* listener) {
if (SystemInfoEventRouter::IsSystemInfoEvent(event_name))
SystemInfoEventRouter::GetInstance()->AddEventListener(event_name);
+ ExtensionService* service =
+ ExtensionSystem::Get(profile_)->extension_service();
+ service->NotifyExtensionEventRoutersOnListenerAdded(event_name);
}
void EventRouter::OnListenerRemoved(const EventListener* listener) {
@@ -225,6 +228,9 @@ void EventRouter::OnListenerRemoved(const EventListener* listener) {
if (SystemInfoEventRouter::IsSystemInfoEvent(event_name))
SystemInfoEventRouter::GetInstance()->RemoveEventListener(event_name);
+ ExtensionService* service =
+ ExtensionSystem::Get(profile_)->extension_service();
+ service->NotifyExtensionEventRoutersOnListenerRemoved(event_name);
}
void EventRouter::AddLazyEventListener(const std::string& event_name,
« no previous file with comments | « chrome/browser/extensions/bluetooth_event_router_unittest.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698