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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/captive_portal/captive_portal_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 (download_service->HasCreatedDownloadManager() ? 792 (download_service->HasCreatedDownloadManager() ?
793 BrowserContext::GetDownloadManager(profiles[i]) : NULL); 793 BrowserContext::GetDownloadManager(profiles[i]) : NULL);
794 if (download_manager && 794 if (download_manager &&
795 download_manager->NonMaliciousInProgressCount() > 0) { 795 download_manager->NonMaliciousInProgressCount() > 0) {
796 int downloadCount = download_manager->NonMaliciousInProgressCount(); 796 int downloadCount = download_manager->NonMaliciousInProgressCount();
797 if ([self userWillWaitForInProgressDownloads:downloadCount]) { 797 if ([self userWillWaitForInProgressDownloads:downloadCount]) {
798 // Create a new browser window (if necessary) and navigate to the 798 // Create a new browser window (if necessary) and navigate to the
799 // downloads page if the user chooses to wait. 799 // downloads page if the user chooses to wait.
800 Browser* browser = chrome::FindBrowserWithProfile(profiles[i]); 800 Browser* browser = chrome::FindBrowserWithProfile(profiles[i]);
801 if (!browser) { 801 if (!browser) {
802 browser = new Browser(Browser::CreateParams(profiles[i])); 802 browser = new Browser(Browser::CreateParams(profiles[i], true));
803 browser->window()->Show(); 803 browser->window()->Show();
804 } 804 }
805 DCHECK(browser); 805 DCHECK(browser);
806 chrome::ShowDownloads(browser); 806 chrome::ShowDownloads(browser);
807 return NO; 807 return NO;
808 } 808 }
809 809
810 // User wants to exit. 810 // User wants to exit.
811 return YES; 811 return YES;
812 } 812 }
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 // to bottleneck the openings through that for uniform handling. 1275 // to bottleneck the openings through that for uniform handling.
1276 - (void)openUrls:(const std::vector<GURL>&)urls { 1276 - (void)openUrls:(const std::vector<GURL>&)urls {
1277 if (!startupComplete_) { 1277 if (!startupComplete_) {
1278 startupUrls_.insert(startupUrls_.end(), urls.begin(), urls.end()); 1278 startupUrls_.insert(startupUrls_.end(), urls.begin(), urls.end());
1279 return; 1279 return;
1280 } 1280 }
1281 1281
1282 Browser* browser = chrome::GetLastActiveBrowser(); 1282 Browser* browser = chrome::GetLastActiveBrowser();
1283 // if no browser window exists then create one with no tabs to be filled in 1283 // if no browser window exists then create one with no tabs to be filled in
1284 if (!browser) { 1284 if (!browser) {
1285 browser = new Browser(Browser::CreateParams([self lastProfile])); 1285 browser = new Browser(Browser::CreateParams([self lastProfile], true));
1286 browser->window()->Show(); 1286 browser->window()->Show();
1287 } 1287 }
1288 1288
1289 base::CommandLine dummy(base::CommandLine::NO_PROGRAM); 1289 base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
1290 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? 1290 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
1291 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; 1291 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
1292 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run); 1292 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run);
1293 launch.OpenURLsInBrowser(browser, false, urls); 1293 launch.OpenURLsInBrowser(browser, false, urls);
1294 } 1294 }
1295 1295
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 1607
1608 //--------------------------------------------------------------------------- 1608 //---------------------------------------------------------------------------
1609 1609
1610 namespace app_controller_mac { 1610 namespace app_controller_mac {
1611 1611
1612 bool IsOpeningNewWindow() { 1612 bool IsOpeningNewWindow() {
1613 return g_is_opening_new_window; 1613 return g_is_opening_new_window;
1614 } 1614 }
1615 1615
1616 } // namespace app_controller_mac 1616 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/captive_portal/captive_portal_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698