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

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

Issue 1757673002: NTP4/apps page: fix page stickiness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promo-cpp
Patch Set: Created 4 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.h
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
index d95e43d5cd7ad4d596665b9cfcddb05e4e7f86e7..ff958fcbad7d485d5c0c32b545f47305279430e1 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
@@ -33,6 +33,10 @@ namespace favicon_base {
struct FaviconImageResult;
}
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
// The handler for Javascript messages related to the "apps" view.
class AppLauncherHandler
: public content::WebUIMessageHandler,
@@ -50,6 +54,13 @@ class AppLauncherHandler
ExtensionService* service,
base::DictionaryValue* value);
+ // Registers values (strings etc.) for the page.
+ static void GetLocalizedValues(Profile* profile,
+ base::DictionaryValue* values);
+
+ // Register per-profile preferences.
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
// WebUIMessageHandler:
void RegisterMessages() override;
@@ -120,9 +131,14 @@ class AppLauncherHandler
// page_index].
void HandleGenerateAppForLink(const base::ListValue* args);
- // Other registered message callbacks with unused |args|.
- void StopShowingAppLauncherPromo(const base::ListValue* args);
- void OnLearnMore(const base::ListValue* args);
+ // Handles "stopShowingAppLauncherPromo" message with unused |args|.
+ void HandleStopShowingAppLauncherPromo(const base::ListValue* args);
+
+ // Handles "learnMore" message with unused |args|.
+ void HandleOnLearnMore(const base::ListValue* args);
+
+ // Handles "pageSelected" message with |args| containing [page_index].
+ void HandlePageSelected(const base::ListValue* args);
private:
struct AppInstallInfo {

Powered by Google App Engine
This is Rietveld 408576698