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

Unified Diff: components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h

Issue 2572133002: Add more features to ntp-tiles-internal (Closed)
Patch Set: remove unneeded include Created 4 years 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: components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h
diff --git a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h
index 23727465e8450faa656fd557caa4f180916241f8..43fbc6591ec802acc25b59de927ac2ce544675d6 100644
--- a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h
+++ b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h
@@ -39,9 +39,12 @@ class NTPTilesInternalsMessageHandler : public MostVisitedSites::Observer {
// Callbacks registered in RegisterMessages().
void HandleRegisterForEvents(const base::ListValue* args);
void HandleUpdate(const base::ListValue* args);
+ void HandleFetchSuggestions(const base::ListValue* args);
+ void HandleViewPopularSitesJson(const base::ListValue* args);
void SendSourceInfo();
void SendTiles(const NTPTilesVector& tiles);
+ void PopularSitesJsonRead(const std::unique_ptr<std::string>& content);
// MostVisitedSites::Observer.
void OnMostVisitedURLsAvailable(const NTPTilesVector& tiles) override;
@@ -53,6 +56,11 @@ class NTPTilesInternalsMessageHandler : public MostVisitedSites::Observer {
int site_count_;
std::unique_ptr<MostVisitedSites> most_visited_sites_;
+ std::string suggestions_status_;
+ std::string popular_sites_json_;
+
+ base::WeakPtrFactory<NTPTilesInternalsMessageHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(NTPTilesInternalsMessageHandler);
};

Powered by Google App Engine
This is Rietveld 408576698