| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index ca12cb9d867f3fcae118b822e295cce25801b69b..fbc0859bab42e1ab68649d47b42ff6daaf097562 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -240,7 +240,7 @@ int GetContentRestrictions(const Browser* browser) {
|
| return content_restrictions;
|
| }
|
|
|
| -void NewEmptyWindow(Profile* profile) {
|
| +void NewEmptyWindow(Profile* profile, HostDesktopType desktop_type) {
|
| bool incognito = profile->IsOffTheRecord();
|
| PrefService* prefs = profile->GetPrefs();
|
| if (incognito) {
|
| @@ -258,25 +258,34 @@ void NewEmptyWindow(Profile* profile) {
|
|
|
| if (incognito) {
|
| content::RecordAction(UserMetricsAction("NewIncognitoWindow"));
|
| - OpenEmptyWindow(profile->GetOffTheRecordProfile());
|
| + OpenEmptyWindow(profile->GetOffTheRecordProfile(), desktop_type);
|
| } else {
|
| content::RecordAction(UserMetricsAction("NewWindow"));
|
| SessionService* session_service =
|
| SessionServiceFactory::GetForProfile(profile->GetOriginalProfile());
|
| if (!session_service ||
|
| !session_service->RestoreIfNecessary(std::vector<GURL>())) {
|
| - OpenEmptyWindow(profile->GetOriginalProfile());
|
| + OpenEmptyWindow(profile->GetOriginalProfile(), desktop_type);
|
| }
|
| }
|
| }
|
|
|
| -Browser* OpenEmptyWindow(Profile* profile) {
|
| - Browser* browser = new Browser(Browser::CreateParams(profile));
|
| +void NewEmptyWindow(Profile* profile) {
|
| + NewEmptyWindow(profile, HOST_DESKTOP_TYPE_NATIVE);
|
| +}
|
| +
|
| +Browser* OpenEmptyWindow(Profile* profile, HostDesktopType desktop_type) {
|
| + Browser* browser = new Browser(
|
| + Browser::CreateParams(Browser::TYPE_TABBED, profile, desktop_type));
|
| AddBlankTab(browser, true);
|
| browser->window()->Show();
|
| return browser;
|
| }
|
|
|
| +Browser* OpenEmptyWindow(Profile* profile) {
|
| + return OpenEmptyWindow(profile, HOST_DESKTOP_TYPE_NATIVE);
|
| +}
|
| +
|
| void OpenWindowWithRestoredTabs(Profile* profile) {
|
| TabRestoreService* service = TabRestoreServiceFactory::GetForProfile(profile);
|
| if (service)
|
|
|