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

Unified Diff: chrome/browser/ui/browser_commands.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_commands.h ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index f3635665ec22a20355cb2da22b61284095962ab7..1c30cc34aee838db187567aa9350421cf4fbac14 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -283,9 +283,11 @@ void OpenWindowWithRestoredTabs(Profile* profile) {
service->RestoreMostRecentEntry(NULL);
}
-void OpenURLOffTheRecord(Profile* profile, const GURL& url) {
+void OpenURLOffTheRecord(Profile* profile,
+ const GURL& url,
+ chrome::HostDesktopType desktop_type) {
Browser* browser = browser::FindOrCreateTabbedBrowser(
- profile->GetOffTheRecordProfile());
+ profile->GetOffTheRecordProfile(), desktop_type);
AddSelectedTabWithURL(browser, url, content::PAGE_TRANSITION_LINK);
browser->window()->Show();
}
@@ -434,7 +436,9 @@ void NewTab(Browser* browser) {
AddBlankTab(browser, true);
GetActiveWebContents(browser)->GetView()->RestoreFocus();
} else {
- Browser* b = browser::FindOrCreateTabbedBrowser(browser->profile());
+ Browser* b =
+ browser::FindOrCreateTabbedBrowser(browser->profile(),
+ browser->host_desktop_type());
AddBlankTab(b, true);
b->window()->Show();
// The call to AddBlankTab above did not set the focus to the tab as its
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698