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

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

Issue 12985002: Add a new App launcher promo to the apps page / NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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.h
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
index e7c6a43a37e0056734c0ce708dda9199808e753f..3d8f8bc10775707e84ba27709c46251cf1460114 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
@@ -93,6 +93,9 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// action for UMA.
void HandleRecordAppLaunchByUrl(const base::ListValue* args);
+ // Callback for "stopShowingAppLauncherPromo" message.
+ void StopShowingAppLauncherPromo(const base::ListValue* args);
+
// Callback for "closeNotification" message.
void HandleNotificationClose(const base::ListValue* args);
@@ -154,7 +157,9 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// Sends |highlight_app_id_| to the js.
void SetAppToBeHighlighted();
- void OnPreferenceChanged();
+ void OnExtensionPreferenceChanged();
+
+ void OnLocalStatePreferenceChanged();
// The apps are represented in the extensions model, which
// outlives us since it's owned by our containing profile.
@@ -165,7 +170,10 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
content::NotificationRegistrar registrar_;
// Monitor extension preference changes so that the Web UI can be notified.
- PrefChangeRegistrar pref_change_registrar_;
+ PrefChangeRegistrar extension_pref_change_registrar_;
+
+ // Monitor the local state pref to control the app launcher promo.
+ PrefChangeRegistrar local_state_pref_change_registrar_;
// Used to show confirmation UI for uninstalling extensions in incognito mode.
scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;

Powered by Google App Engine
This is Rietveld 408576698