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

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

Issue 16191003: Add enable-app-shims to chrome://flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass --enable-app-shims through to NPT Created 7 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
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 9e1c87fed2f2e8b236ec99d29f662068695e1a0a..f177c76ccb8b14651349061496d14544ab3cdfbc 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -10,6 +10,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/command_line.h"
#include "base/i18n/rtl.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
@@ -36,6 +37,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/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
@@ -324,12 +326,10 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
dictionary->Set("apps", list);
- // TODO(estade): remove these settings when the old NTP is removed. The new
- // NTP does it in js.
#if defined(OS_MACOSX)
- // App windows are not yet implemented on mac.
- dictionary->SetBoolean("disableAppWindowLaunch", true);
- dictionary->SetBoolean("disableCreateAppShortcut", true);
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAppShims))
+ dictionary->SetBoolean("disableCreateAppShortcut", true);
#endif
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698