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

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

Issue 225093019: Zoom Extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 8 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/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 17 matching lines...) Expand all
28 api::tabs::OnSelectionChanged::kEventName); 28 api::tabs::OnSelectionChanged::kEventName);
29 event_router->RegisterObserver(this, api::tabs::OnActiveChanged::kEventName); 29 event_router->RegisterObserver(this, api::tabs::OnActiveChanged::kEventName);
30 event_router->RegisterObserver(this, api::tabs::OnActivated::kEventName); 30 event_router->RegisterObserver(this, api::tabs::OnActivated::kEventName);
31 event_router->RegisterObserver(this, 31 event_router->RegisterObserver(this,
32 api::tabs::OnHighlightChanged::kEventName); 32 api::tabs::OnHighlightChanged::kEventName);
33 event_router->RegisterObserver(this, api::tabs::OnHighlighted::kEventName); 33 event_router->RegisterObserver(this, api::tabs::OnHighlighted::kEventName);
34 event_router->RegisterObserver(this, api::tabs::OnDetached::kEventName); 34 event_router->RegisterObserver(this, api::tabs::OnDetached::kEventName);
35 event_router->RegisterObserver(this, api::tabs::OnAttached::kEventName); 35 event_router->RegisterObserver(this, api::tabs::OnAttached::kEventName);
36 event_router->RegisterObserver(this, api::tabs::OnRemoved::kEventName); 36 event_router->RegisterObserver(this, api::tabs::OnRemoved::kEventName);
37 event_router->RegisterObserver(this, api::tabs::OnReplaced::kEventName); 37 event_router->RegisterObserver(this, api::tabs::OnReplaced::kEventName);
38 event_router->RegisterObserver(this, api::tabs::OnZoomChange::kEventName);
38 39
39 // Windows API Events. 40 // Windows API Events.
40 event_router->RegisterObserver(this, api::windows::OnCreated::kEventName); 41 event_router->RegisterObserver(this, api::windows::OnCreated::kEventName);
41 event_router->RegisterObserver(this, api::windows::OnRemoved::kEventName); 42 event_router->RegisterObserver(this, api::windows::OnRemoved::kEventName);
42 event_router->RegisterObserver(this, 43 event_router->RegisterObserver(this,
43 api::windows::OnFocusChanged::kEventName); 44 api::windows::OnFocusChanged::kEventName);
44 } 45 }
45 46
46 TabsWindowsAPI::~TabsWindowsAPI() { 47 TabsWindowsAPI::~TabsWindowsAPI() {
47 } 48 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) { 82 void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) {
82 // Initialize the event routers. 83 // Initialize the event routers.
83 tabs_event_router(); 84 tabs_event_router();
84 windows_event_router(); 85 windows_event_router();
85 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( 86 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver(
86 this); 87 this);
87 } 88 }
88 89
89 } // namespace extensions 90 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698