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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_windows_api.cc

Issue 1099553002: extensions: windows: list all windows from the current profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add application windows resize constraint test Created 5 years, 6 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/api/tabs/tabs_windows_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_windows_api.cc b/chrome/browser/extensions/api/tabs/tabs_windows_api.cc
index 641aad75b6bb0d4091a076410f23eb4f35611632..c03c8e2c5d431a299f898c970d34ffa6146b0782 100644
--- a/chrome/browser/extensions/api/tabs/tabs_windows_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_windows_api.cc
@@ -41,6 +41,10 @@ TabsWindowsAPI::TabsWindowsAPI(content::BrowserContext* context)
event_router->RegisterObserver(this, api::windows::OnRemoved::kEventName);
event_router->RegisterObserver(this,
api::windows::OnFocusChanged::kEventName);
+
+ // We listen to windows events right from the beginning because we
+ // have to create a WindowController for each AppWindow.
+ windows_event_router();
dcheng 2015/06/29 18:15:49 Construct this directly in the initializer list in
llandwerlin-old 2015/06/30 10:20:47 Done.
}
TabsWindowsAPI::~TabsWindowsAPI() {
@@ -80,7 +84,7 @@ TabsWindowsAPI::GetFactoryInstance() {
void TabsWindowsAPI::OnListenerAdded(const EventListenerInfo& details) {
// Initialize the event routers.
tabs_event_router();
- windows_event_router();
+ windows_event_router()->DispatchEvents();
EventRouter::Get(browser_context_)->UnregisterObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698