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

Unified Diff: chrome/browser/dom_ui/app_launcher_handler.cc

Issue 1730013: fullscreen window app launch container (Closed)
Patch Set: added tests Created 10 years, 8 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 | « chrome/browser/browser_init.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/app_launcher_handler.cc
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
index 6f48333cc2cef447a83636dbfbff25340b1bccd4..7112dad32c89f2551e72d26dd797e873b9915658 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -125,16 +125,20 @@ void AppLauncherHandler::HandleLaunchApp(const Value* value) {
return;
}
+ // Override the default launch container.
Extension* extension =
extensions_service_->GetExtensionById(extension_id, false);
DCHECK(extension);
+ Extension::LaunchContainer container;
if (launch_container == "tab")
- Browser::OpenApplicationTab(profile, extension);
+ container = Extension::LAUNCH_TAB;
else if (launch_container == "panel")
- Browser::OpenApplicationWindow(profile, extension, GURL(), true);
+ container = Extension::LAUNCH_PANEL;
else if (launch_container == "window")
- Browser::OpenApplicationWindow(profile, extension, GURL(), false);
+ container = Extension::LAUNCH_WINDOW;
else
NOTREACHED() << "Unexpected launch container: " << launch_container << ".";
+
+ Browser::OpenApplication(profile, extension, container);
}
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698