summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_init.cc3
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
3 files changed, 6 insertions, 1 deletions
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[];