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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 12316077: Move the parsing of app.launch related keys out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 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
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index a06eab3ac1dbf35ced5fe883cecd562c2fbd6a6c..f4eb25272af0f163d4d1e21d867e0460da6c5cbb 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -36,6 +36,7 @@
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/extensions/app_launch_manifest_handler.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
@@ -102,7 +103,8 @@ void AppLauncherHandler::CreateAppInfo(
// impede our ability to determine directionality.
string16 name = UTF8ToUTF16(extension->name());
base::i18n::UnadjustStringForLocaleDirection(&name);
- NewTabUI::SetUrlTitleAndDirection(value, name, extension->GetFullLaunchURL());
+ NewTabUI::SetUrlTitleAndDirection(
+ value, name, extensions::AppLaunchInfo::GetFullLaunchURL(extension));
bool enabled = service->IsExtensionEnabled(extension->id()) &&
!service->GetTerminatedExtension(extension->id());
@@ -129,7 +131,8 @@ void AppLauncherHandler::CreateAppInfo(
false, &icon_small_exists);
value->SetString("icon_small", icon_small.spec());
value->SetBoolean("icon_small_exists", icon_small_exists);
- value->SetInteger("launch_container", extension->launch_container());
+ value->SetInteger("launch_container",
+ extensions::AppLaunchInfo::GetLaunchContainer(extension));
ExtensionPrefs* prefs = service->extension_prefs();
value->SetInteger("launch_type",
prefs->GetLaunchType(extension,

Powered by Google App Engine
This is Rietveld 408576698