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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_windows_api.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/tabs/tabs_windows_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_windows_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/browser/extensions/api/tabs/tabs_event_router.h" 8 #include "chrome/browser/extensions/api/tabs/tabs_event_router.h"
9 #include "chrome/browser/extensions/api/tabs/windows_event_router.h" 9 #include "chrome/browser/extensions/api/tabs/windows_event_router.h"
10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/common/extensions/api/tabs.h" 10 #include "chrome/common/extensions/api/tabs.h"
12 #include "chrome/common/extensions/api/windows.h" 11 #include "chrome/common/extensions/api/windows.h"
13 #include "extensions/browser/event_router.h" 12 #include "extensions/browser/event_router.h"
13 #include "extensions/browser/extension_system.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 TabsWindowsAPI::TabsWindowsAPI(Profile* profile) : profile_(profile) { 17 TabsWindowsAPI::TabsWindowsAPI(Profile* profile) : profile_(profile) {
18 // Tabs API Events. 18 // Tabs API Events.
19 ExtensionSystem::Get(profile_)->event_router()->RegisterObserver( 19 ExtensionSystem::Get(profile_)->event_router()->RegisterObserver(
20 this, api::tabs::OnCreated::kEventName); 20 this, api::tabs::OnCreated::kEventName);
21 ExtensionSystem::Get(profile_)->event_router()->RegisterObserver( 21 ExtensionSystem::Get(profile_)->event_router()->RegisterObserver(
22 this, api::tabs::OnUpdated::kEventName); 22 this, api::tabs::OnUpdated::kEventName);
23 ExtensionSystem::Get(profile_)->event_router()->RegisterObserver( 23 ExtensionSystem::Get(profile_)->event_router()->RegisterObserver(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) { 84 void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) {
85 // Initialize the event routers. 85 // Initialize the event routers.
86 tabs_event_router(); 86 tabs_event_router();
87 windows_event_router(); 87 windows_event_router();
88 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 88 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
89 } 89 }
90 90
91 } // namespace extensions 91 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_event_router.cc ('k') | chrome/browser/extensions/api/tabs/windows_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698