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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 113960: Handle opening URLs when there is no window open.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 17084)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -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();
Scott Hess - ex-Googler 2009/05/28 19:34:22 Does the Show() at this point cause any jankiness?
+ }
+
CommandLine dummy((std::wstring()));
BrowserInit::LaunchWithProfile launch(std::wstring(), dummy);
- launch.OpenURLsInBrowser(BrowserList::GetLastActive(), false, urls);
+ launch.OpenURLsInBrowser(browser, false, urls);
}
- (void)openPendingURLs {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698