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/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/browser_shutdown.h" | 12 #include "chrome/browser/browser_shutdown.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
14 #include "chrome/browser/lifetime/application_lifetime.h" | 14 #include "chrome/browser/lifetime/application_lifetime.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_finder.h" | 17 #include "chrome/browser/ui/browser_finder.h" |
18 #include "chrome/browser/ui/browser_iterator.h" | 18 #include "chrome/browser/ui/browser_iterator.h" |
19 #include "chrome/browser/ui/browser_list_observer.h" | 19 #include "chrome/browser/ui/browser_list_observer.h" |
20 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
21 #include "chrome/browser/ui/host_desktop.h" | |
22 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
23 #include "content/public/browser/user_metrics.h" | 22 #include "content/public/browser/user_metrics.h" |
| 23 #include "ui/gfx/host_desktop_type.h" |
24 | 24 |
25 using base::UserMetricsAction; | 25 using base::UserMetricsAction; |
26 using content::WebContents; | 26 using content::WebContents; |
27 | 27 |
28 // static | 28 // static |
29 base::LazyInstance<base::ObserverList<chrome::BrowserListObserver>>::Leaky | 29 base::LazyInstance<base::ObserverList<chrome::BrowserListObserver>>::Leaky |
30 BrowserList::observers_ = LAZY_INSTANCE_INITIALIZER; | 30 BrowserList::observers_ = LAZY_INSTANCE_INITIALIZER; |
31 | 31 |
32 // static | 32 // static |
33 BrowserList* BrowserList::native_instance_ = NULL; | 33 BrowserList* BrowserList::native_instance_ = NULL; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 234 } |
235 | 235 |
236 // static | 236 // static |
237 void BrowserList::RemoveBrowserFrom(Browser* browser, | 237 void BrowserList::RemoveBrowserFrom(Browser* browser, |
238 BrowserVector* browser_list) { | 238 BrowserVector* browser_list) { |
239 BrowserVector::iterator remove_browser = | 239 BrowserVector::iterator remove_browser = |
240 std::find(browser_list->begin(), browser_list->end(), browser); | 240 std::find(browser_list->begin(), browser_list->end(), browser); |
241 if (remove_browser != browser_list->end()) | 241 if (remove_browser != browser_list->end()) |
242 browser_list->erase(remove_browser); | 242 browser_list->erase(remove_browser); |
243 } | 243 } |
OLD | NEW |