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

Unified Diff: chrome/browser/ui/browser_finder.cc

Issue 10836218: Remove BrowserList::GetLastActive calls from window_sizer.cc et al. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/ui/browser_finder.cc
diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc
index a363c39b3f5a4bdfe814fc54e4161a27f00eb993..efcf4cd3e6c51a4495f89c7fb95b3b1d2a8c55e8 100644
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_list_impl.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
@@ -178,6 +179,15 @@ Browser* FindLastActiveWithProfile(Profile* profile) {
Browser::FEATURE_NONE, kMatchAny);
}
+Browser* FindLastActiveWithHostDesktopType(chrome::HostDesktopType type) {
+ chrome::BrowserListImpl* browser_list_impl =
+ chrome::BrowserListImpl::GetInstance(type);
+ if (browser_list_impl) {
MAD 2012/08/13 21:25:10 no need for {}
robertshield 2012/08/13 21:37:41 Done.
+ return browser_list_impl->GetLastActive();
+ }
+ return NULL;
+}
+
size_t GetBrowserCount(Profile* profile) {
return GetBrowserCountImpl(profile, kMatchAny);
}

Powered by Google App Engine
This is Rietveld 408576698