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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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 e4198d48bab1a9e1645d232f8e95dd0e489dd5c0..e7ec144f9a927c692645386b970e02e905f65c9f 100644
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -104,7 +104,7 @@ Browser* FindBrowserMatching(const T& begin,
}
Browser* FindBrowserWithTabbedOrAnyType(Profile* profile,
- chrome::HostDesktopType desktop_type,
+ ui::HostDesktopType desktop_type,
bool match_tabbed,
bool match_original_profiles) {
BrowserList* browser_list_impl = BrowserList::GetInstance(desktop_type);
@@ -129,7 +129,7 @@ Browser* FindBrowserWithTabbedOrAnyType(Profile* profile,
}
size_t GetBrowserCountImpl(Profile* profile,
- chrome::HostDesktopType desktop_type,
+ ui::HostDesktopType desktop_type,
uint32 match_types) {
BrowserList* browser_list_impl = BrowserList::GetInstance(desktop_type);
size_t count = 0;
@@ -149,7 +149,7 @@ namespace chrome {
Browser* FindTabbedBrowser(Profile* profile,
bool match_original_profiles,
- HostDesktopType type) {
+ ui::HostDesktopType type) {
return FindBrowserWithTabbedOrAnyType(profile,
type,
true,
@@ -158,7 +158,7 @@ Browser* FindTabbedBrowser(Profile* profile,
Browser* FindAnyBrowser(Profile* profile,
bool match_original_profiles,
- HostDesktopType type) {
+ ui::HostDesktopType type) {
return FindBrowserWithTabbedOrAnyType(profile,
type,
false,
@@ -166,7 +166,7 @@ Browser* FindAnyBrowser(Profile* profile,
}
Browser* FindBrowserWithProfile(Profile* profile,
- HostDesktopType desktop_type) {
+ ui::HostDesktopType desktop_type) {
return FindBrowserWithTabbedOrAnyType(profile, desktop_type, false, false);
}
@@ -198,7 +198,7 @@ Browser* FindBrowserWithWebContents(const WebContents* web_contents) {
return NULL;
}
-Browser* FindLastActiveWithProfile(Profile* profile, HostDesktopType type) {
+Browser* FindLastActiveWithProfile(Profile* profile, ui::HostDesktopType type) {
BrowserList* list = BrowserList::GetInstance(type);
// We are only interested in last active browsers, so we don't fall back to
// all browsers like FindBrowserWith* do.
@@ -206,7 +206,7 @@ Browser* FindLastActiveWithProfile(Profile* profile, HostDesktopType type) {
profile, Browser::FEATURE_NONE, kMatchAny);
}
-Browser* FindLastActiveWithHostDesktopType(HostDesktopType type) {
+Browser* FindLastActiveWithHostDesktopType(ui::HostDesktopType type) {
BrowserList* browser_list_impl = BrowserList::GetInstance(type);
if (browser_list_impl)
return browser_list_impl->GetLastActive();
@@ -215,8 +215,9 @@ Browser* FindLastActiveWithHostDesktopType(HostDesktopType type) {
size_t GetTotalBrowserCount() {
size_t count = 0;
- for (HostDesktopType t = HOST_DESKTOP_TYPE_FIRST; t < HOST_DESKTOP_TYPE_COUNT;
- t = static_cast<HostDesktopType>(t + 1)) {
+ for (ui::HostDesktopType t = ui::HOST_DESKTOP_TYPE_FIRST;
+ t < ui::HOST_DESKTOP_TYPE_COUNT;
+ t = static_cast<ui::HostDesktopType>(t + 1)) {
count += BrowserList::GetInstance(t)->size();
}
return count;
@@ -224,18 +225,19 @@ size_t GetTotalBrowserCount() {
size_t GetTotalBrowserCountForProfile(Profile* profile) {
size_t count = 0;
- for (HostDesktopType t = HOST_DESKTOP_TYPE_FIRST; t < HOST_DESKTOP_TYPE_COUNT;
- t = static_cast<HostDesktopType>(t + 1)) {
+ for (ui::HostDesktopType t = ui::HOST_DESKTOP_TYPE_FIRST;
+ t < ui::HOST_DESKTOP_TYPE_COUNT;
+ t = static_cast<ui::HostDesktopType>(t + 1)) {
count += GetBrowserCount(profile, t);
}
return count;
}
-size_t GetBrowserCount(Profile* profile, HostDesktopType type) {
+size_t GetBrowserCount(Profile* profile, ui::HostDesktopType type) {
return GetBrowserCountImpl(profile, type, kMatchAny);
}
-size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type) {
+size_t GetTabbedBrowserCount(Profile* profile, ui::HostDesktopType type) {
return GetBrowserCountImpl(profile, type, kMatchTabbed);
}

Powered by Google App Engine
This is Rietveld 408576698