diff options
-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 { |