diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-18 02:40:24 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-18 02:40:24 +0000 |
commit | d5f53a6a42306086eb6fe64e56456959f4931fd9 (patch) | |
tree | 7bc69834a685b1cab1decc117dec126d99f4f2ef | |
parent | ef6a75dbc49caf22561609d734675e9c36424dc2 (diff) | |
download | chromium_src-d5f53a6a42306086eb6fe64e56456959f4931fd9.zip chromium_src-d5f53a6a42306086eb6fe64e56456959f4931fd9.tar.gz chromium_src-d5f53a6a42306086eb6fe64e56456959f4931fd9.tar.bz2 |
Adds the cmdline "--new-window" that instructs the init sequence
to open a new window instead of reusing the most recent tab for
opening cmdline URLs.
BUG=2843
TEST=Run with --new-window switch and confirm that a new window pops up
patch by <clemens [at] endorphin dot org>
original review: <http://codereview.chromium.org/464060>
Review URL: http://codereview.chromium.org/503023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34926 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | chrome/browser/browser_init.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
4 files changed, 7 insertions, 1 deletions
@@ -56,3 +56,4 @@ Bryan Donlan <bdonlan@gmail.com> Ramkumar Ramachandra <artagnon@gmail.com> Dominic Jodoin <dominic.jodoin@gmail.com> Kaspar Brand <googlecontrib@velox.ch> +Clemens Fruhwirth <clemens@endorphin.org> diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index b42509d..3ccb82f 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -439,8 +439,9 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, Browser* browser = NULL; if (urls_to_open.empty()) AddStartupURLs(&urls_to_open); - else + else if (!command_line_.HasSwitch(switches::kOpenInNewWindow)) browser = BrowserList::GetLastActive(); + OpenURLsInBrowser(browser, process_startup, urls_to_open); } if (process_startup) { diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 9c6dcb8..f29433d 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -399,6 +399,9 @@ const char kNoSandbox[] = "no-sandbox"; // Number of entries to show in the omnibox popup. const char kOmniBoxPopupCount[] = "omnibox-popup-count"; +// Launch URL in new browser window. +const char kOpenInNewWindow[] = "new-window"; + // Package an extension to a .crx installable file from a given directory. const char kPackExtension[] = "pack-extension"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index fea4fdc..ca1144d 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -121,6 +121,7 @@ extern const char kNoJsRandomness[]; extern const char kNoProxyServer[]; extern const char kNoSandbox[]; extern const char kOmniBoxPopupCount[]; +extern const char kOpenInNewWindow[]; extern const char kPackExtension[]; extern const char kPackExtensionKey[]; extern const char kParentProfile[]; |