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

Unified Diff: chrome/browser/ui/browser.cc

Issue 5019005: Add "open as window" menu item to NTP app menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for commit Created 10 years, 1 month 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 | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index cb6dd29cc981684a6c99effb0a8cc0ecd5d680be..b566eb79b7aa9d0b8855ef92ac9ee6aed4368db6 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -499,8 +499,6 @@ TabContents* Browser::OpenApplication(Profile* profile,
const std::string& app_id,
TabContents* existing_tab) {
ExtensionsService* extensions_service = profile->GetExtensionsService();
- if (!extensions_service->is_ready())
- return NULL;
// If the extension with |app_id| could't be found, most likely because it
// was uninstalled.
@@ -523,9 +521,11 @@ TabContents* Browser::OpenApplication(
UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchContainer", container, 100);
- // The app is not yet open. Load it.
switch (container) {
case extension_misc::LAUNCH_WINDOW:
+ tab = Browser::OpenApplicationWindow(profile,
+ extension->GetFullLaunchURL());
+ break;
case extension_misc::LAUNCH_PANEL:
tab = Browser::OpenApplicationWindow(profile, extension, container,
GURL());
@@ -589,7 +589,7 @@ TabContents* Browser::OpenApplicationWindow(
}
// static
-TabContents* Browser::OpenApplicationWindow(Profile* profile, GURL& url) {
+TabContents* Browser::OpenApplicationWindow(Profile* profile, const GURL& url) {
return OpenApplicationWindow(profile, NULL, extension_misc::LAUNCH_WINDOW,
url);
}
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698