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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 11779019: browser: Move FindTabbedBrowser() function into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
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 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // Session startup didn't occur, open the urls. 591 // Session startup didn't occur, open the urls.
592 Browser* browser = NULL; 592 Browser* browser = NULL;
593 std::vector<GURL> adjust_urls = urls_to_open; 593 std::vector<GURL> adjust_urls = urls_to_open;
594 if (adjust_urls.empty()) { 594 if (adjust_urls.empty()) {
595 AddStartupURLs(&adjust_urls); 595 AddStartupURLs(&adjust_urls);
596 if (StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( 596 if (StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser(
597 profile_, adjust_urls)) 597 profile_, adjust_urls))
598 return; 598 return;
599 } else if (!command_line_.HasSwitch(switches::kOpenInNewWindow)) { 599 } else if (!command_line_.HasSwitch(switches::kOpenInNewWindow)) {
600 // Always open a list of urls in a window on the native desktop. 600 // Always open a list of urls in a window on the native desktop.
601 browser = browser::FindTabbedBrowser(profile_, false, 601 browser = chrome::FindTabbedBrowser(profile_, false,
602 chrome::HOST_DESKTOP_TYPE_NATIVE); 602 chrome::HOST_DESKTOP_TYPE_NATIVE);
603 } 603 }
604 // This will launch a browser; prevent session restore. 604 // This will launch a browser; prevent session restore.
605 StartupBrowserCreator::in_synchronous_profile_launch_ = true; 605 StartupBrowserCreator::in_synchronous_profile_launch_ = true;
606 browser = OpenURLsInBrowser(browser, process_startup, adjust_urls); 606 browser = OpenURLsInBrowser(browser, process_startup, adjust_urls);
607 StartupBrowserCreator::in_synchronous_profile_launch_ = false; 607 StartupBrowserCreator::in_synchronous_profile_launch_ = false;
608 AddInfoBarsIfNecessary(browser, is_process_startup); 608 AddInfoBarsIfNecessary(browser, is_process_startup);
609 } 609 }
610 610
611 bool StartupBrowserCreatorImpl::ProcessStartupURLs( 611 bool StartupBrowserCreatorImpl::ProcessStartupURLs(
612 const std::vector<GURL>& urls_to_open) { 612 const std::vector<GURL>& urls_to_open) {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 956 }
957 957
958 #if !defined(OS_WIN) || defined(USE_AURA) 958 #if !defined(OS_WIN) || defined(USE_AURA)
959 // static 959 // static
960 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( 960 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser(
961 Profile* profile, 961 Profile* profile,
962 const std::vector<GURL>& startup_urls) { 962 const std::vector<GURL>& startup_urls) {
963 return false; 963 return false;
964 } 964 }
965 #endif 965 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698