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

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

Issue 10967003: Add desktop type context to most existing instances of FindTabbedBrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving check_deps exception to specific_include_rules after chat with Kai. Created 8 years, 2 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
« no previous file with comments | « chrome/browser/ui/browser_finder.h ('k') | chrome/browser/ui/browser_navigator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_finder.cc
diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc
index 4d1fb3678f549e00bb0d0c043ec438030b1efae9..3e650a6393d8cbaa720ab48ac8248527408a6ea9 100644
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -127,15 +127,28 @@ size_t GetBrowserCountImpl(Profile* profile,
} // namespace
-Browser* FindTabbedBrowser(Profile* profile, bool match_original_profiles) {
+Browser* FindTabbedBrowser(Profile* profile,
+ bool match_original_profiles) {
+ return FindTabbedBrowser(profile, match_original_profiles,
+ chrome::HOST_DESKTOP_TYPE_NATIVE);
+}
+
+Browser* FindTabbedBrowser(Profile* profile,
+ bool match_original_profiles,
+ chrome::HostDesktopType type) {
return FindBrowserWithTabbedOrAnyType(profile,
- kDefaultHostDesktopType,
+ type,
true,
match_original_profiles);
}
Browser* FindOrCreateTabbedBrowser(Profile* profile) {
- Browser* browser = FindTabbedBrowser(profile, false);
+ return FindOrCreateTabbedBrowser(profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
+}
+
+Browser* FindOrCreateTabbedBrowser(Profile* profile,
+ chrome::HostDesktopType type) {
+ Browser* browser = FindTabbedBrowser(profile, false, type);
if (!browser)
browser = new Browser(Browser::CreateParams(profile));
return browser;
« no previous file with comments | « chrome/browser/ui/browser_finder.h ('k') | chrome/browser/ui/browser_navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698