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

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

Issue 10855183: Give access to browsers by Profile/HostDesktopType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now Ash and Native desktop types are the same on ChromeOS Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « PRESUBMIT.py ('k') | chrome/browser/chrome_browser_main.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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 DownloadService* download_service = 665 DownloadService* download_service =
666 DownloadServiceFactory::GetForProfile(profiles[i]); 666 DownloadServiceFactory::GetForProfile(profiles[i]);
667 DownloadManager* download_manager = 667 DownloadManager* download_manager =
668 (download_service->HasCreatedDownloadManager() ? 668 (download_service->HasCreatedDownloadManager() ?
669 BrowserContext::GetDownloadManager(profiles[i]) : NULL); 669 BrowserContext::GetDownloadManager(profiles[i]) : NULL);
670 if (download_manager && download_manager->InProgressCount() > 0) { 670 if (download_manager && download_manager->InProgressCount() > 0) {
671 int downloadCount = download_manager->InProgressCount(); 671 int downloadCount = download_manager->InProgressCount();
672 if ([self userWillWaitForInProgressDownloads:downloadCount]) { 672 if ([self userWillWaitForInProgressDownloads:downloadCount]) {
673 // Create a new browser window (if necessary) and navigate to the 673 // Create a new browser window (if necessary) and navigate to the
674 // downloads page if the user chooses to wait. 674 // downloads page if the user chooses to wait.
675 Browser* browser = browser::FindBrowserWithProfile(profiles[i]); 675 Browser* browser = browser::FindBrowserWithProfile(
676 profiles[i], chrome::HOST_DESKTOP_TYPE_NATIVE);
676 if (!browser) { 677 if (!browser) {
677 browser = new Browser(Browser::CreateParams(profiles[i])); 678 browser = new Browser(Browser::CreateParams(profiles[i]));
678 browser->window()->Show(); 679 browser->window()->Show();
679 } 680 }
680 DCHECK(browser); 681 DCHECK(browser);
681 chrome::ShowDownloads(browser); 682 chrome::ShowDownloads(browser);
682 return NO; 683 return NO;
683 } 684 }
684 685
685 // User wants to exit. 686 // User wants to exit.
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 1291
1291 //--------------------------------------------------------------------------- 1292 //---------------------------------------------------------------------------
1292 1293
1293 namespace app_controller_mac { 1294 namespace app_controller_mac {
1294 1295
1295 bool IsOpeningNewWindow() { 1296 bool IsOpeningNewWindow() {
1296 return g_is_opening_new_window; 1297 return g_is_opening_new_window;
1297 } 1298 }
1298 1299
1299 } // namespace app_controller_mac 1300 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698