OLD | NEW |
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/ui/browser_list.h" | 5 #include "chrome/browser/ui/browser_list.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/browser_shutdown.h" | 11 #include "chrome/browser/browser_shutdown.h" |
12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/lifetime/application_lifetime.h" | 13 #include "chrome/browser/lifetime/application_lifetime.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
17 #include "chrome/browser/ui/browser_iterator.h" | 17 #include "chrome/browser/ui/browser_iterator.h" |
18 #include "chrome/browser/ui/browser_list_observer.h" | 18 #include "chrome/browser/ui/browser_list_observer.h" |
19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
20 #include "chrome/browser/ui/host_desktop.h" | 20 #include "chrome/browser/ui/host_desktop.h" |
21 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
22 #include "content/public/browser/user_metrics.h" | 22 #include "content/public/browser/user_metrics.h" |
23 | 23 |
24 #if defined(OS_CHROMEOS) | |
25 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
26 #endif | |
27 | |
28 using base::UserMetricsAction; | 24 using base::UserMetricsAction; |
29 using content::WebContents; | 25 using content::WebContents; |
30 | 26 |
31 // static | 27 // static |
32 base::LazyInstance<ObserverList<chrome::BrowserListObserver> >::Leaky | 28 base::LazyInstance<ObserverList<chrome::BrowserListObserver> >::Leaky |
33 BrowserList::observers_ = LAZY_INSTANCE_INITIALIZER; | 29 BrowserList::observers_ = LAZY_INSTANCE_INITIALIZER; |
34 | 30 |
35 // static | 31 // static |
36 BrowserList* BrowserList::native_instance_ = NULL; | 32 BrowserList* BrowserList::native_instance_ = NULL; |
37 BrowserList* BrowserList::ash_instance_ = NULL; | 33 BrowserList* BrowserList::ash_instance_ = NULL; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 173 } |
178 | 174 |
179 // static | 175 // static |
180 void BrowserList::RemoveBrowserFrom(Browser* browser, | 176 void BrowserList::RemoveBrowserFrom(Browser* browser, |
181 BrowserVector* browser_list) { | 177 BrowserVector* browser_list) { |
182 BrowserVector::iterator remove_browser = | 178 BrowserVector::iterator remove_browser = |
183 std::find(browser_list->begin(), browser_list->end(), browser); | 179 std::find(browser_list->begin(), browser_list->end(), browser); |
184 if (remove_browser != browser_list->end()) | 180 if (remove_browser != browser_list->end()) |
185 browser_list->erase(remove_browser); | 181 browser_list->erase(remove_browser); |
186 } | 182 } |
OLD | NEW |