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

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

Issue 3342009: Remove old debug code from ntp. (Closed)
Patch Set: Created 10 years, 4 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 | chrome/browser/resources/new_new_tab.css » ('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 5333b2d03223d06357df12fd5c40e5ce70d92af4..46cf4788bfb7c3e4cc5a207faf881c17a0a6420d 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -138,18 +138,16 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) {
void AppLauncherHandler::HandleLaunchApp(const ListValue* args) {
std::string extension_id;
- std::string launch_container;
int left = 0;
int top = 0;
int width = 0;
int height = 0;
if (!args->GetString(0, &extension_id) ||
- !args->GetString(1, &launch_container) ||
- !ExtractInt(args, 2, &left) ||
- !ExtractInt(args, 3, &top) ||
- !ExtractInt(args, 4, &width) ||
- !ExtractInt(args, 5, &height)) {
+ !ExtractInt(args, 1, &left) ||
+ !ExtractInt(args, 2, &top) ||
+ !ExtractInt(args, 3, &width) ||
+ !ExtractInt(args, 4, &height)) {
NOTREACHED();
return;
}
@@ -161,22 +159,11 @@ void AppLauncherHandler::HandleLaunchApp(const ListValue* args) {
dom_ui_->tab_contents()->GetContainerBounds(&tab_contents_bounds);
rect.Offset(tab_contents_bounds.origin());
- // Override the default launch container.
Extension* extension =
extensions_service_->GetExtensionById(extension_id, false);
DCHECK(extension);
-
Profile* profile = extensions_service_->profile();
-
Extension::LaunchContainer container = extension->launch_container();
- if (launch_container == "tab")
- container = Extension::LAUNCH_TAB;
- else if (launch_container == "panel")
- container = Extension::LAUNCH_PANEL;
- else if (launch_container == "window")
- container = Extension::LAUNCH_WINDOW;
- else if (!launch_container.empty())
- NOTREACHED() << "Unexpected launch container: " << launch_container << ".";
// To give a more "launchy" experience when using the NTP launcher, we close
// it automatically.
« no previous file with comments | « no previous file | chrome/browser/resources/new_new_tab.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698