diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:45:07 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:45:07 +0000 |
commit | 0e8635177ee343f1c1ee48e7016a54b97bbf02ff (patch) | |
tree | c55e38213dad68f5b7493f2fefbe49ce142230f1 | |
parent | b730318b9494f04b8519def4bbf576f2da092eee (diff) | |
download | chromium_src-0e8635177ee343f1c1ee48e7016a54b97bbf02ff.zip chromium_src-0e8635177ee343f1c1ee48e7016a54b97bbf02ff.tar.gz chromium_src-0e8635177ee343f1c1ee48e7016a54b97bbf02ff.tar.bz2 |
Handle opening URLs when there is no window open.
BUG=http://crbug.com/12550
TEST=as described in bug report
Review URL: http://codereview.chromium.org/113960
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17097 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index fbf2ef0..1016bcf1 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -353,9 +353,16 @@ return; } + Browser* browser = BrowserList::GetLastActive(); + // if no browser window exists then create one with no tabs to be filled in + if (!browser) { + browser = Browser::Create([self defaultProfile]); + browser->window()->Show(); + } + CommandLine dummy((std::wstring())); BrowserInit::LaunchWithProfile launch(std::wstring(), dummy); - launch.OpenURLsInBrowser(BrowserList::GetLastActive(), false, urls); + launch.OpenURLsInBrowser(browser, false, urls); } - (void)openPendingURLs { |