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

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

Issue 7215035: ntp4: add app context menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: response to review comments Created 9 years, 6 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 67ca03a0fb569726e58dd1d50fde1367fe6ead79..5ca61e37459c936c1ca81edb469c2ad7397015f4 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -248,6 +248,8 @@ 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);
@@ -420,6 +422,11 @@ void AppLauncherHandler::HandleSetLaunchType(const ListValue* args) {
extensions_service_->GetExtensionById(extension_id, true);
CHECK(extension);
+ // Don't update the page; it already knows about the launch type change.
+ scoped_ptr<AutoReset<bool> > auto_reset;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4))
+ auto_reset.reset(new AutoReset<bool>(&ignore_changes_, true));
+
extensions_service_->extension_prefs()->SetLaunchType(
extension_id,
static_cast<ExtensionPrefs::LaunchType>(

Powered by Google App Engine
This is Rietveld 408576698