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

Unified Diff: chrome/browser/android/most_visited_sites.h

Issue 1265983007: Popular sites on the NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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/android/most_visited_sites.h
diff --git a/chrome/browser/android/most_visited_sites.h b/chrome/browser/android/most_visited_sites.h
index d49bfea8b53a945e3c0ff0432809fb515cc91415..77ee694470dcfbdb1f880b1a3659a3601b5fa129 100644
--- a/chrome/browser/android/most_visited_sites.h
+++ b/chrome/browser/android/most_visited_sites.h
@@ -7,8 +7,12 @@
#include <jni.h>
+#include <string>
+#include <vector>
+
#include "base/android/scoped_java_ref.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
#include "chrome/browser/profiles/profile.h"
@@ -21,6 +25,9 @@ namespace suggestions {
class SuggestionsService;
}
+class PopularSites;
+class GURL;
Bernhard Bauer 2015/08/03 17:04:50 Ordering: GURL before PopularSites
Marc Treib 2015/08/04 08:16:41 Done.
+
// Provides the list of most visited sites and their thumbnails to Java.
class MostVisitedSites : public sync_driver::SyncServiceObserver,
public history::TopSitesObserver {
@@ -68,10 +75,15 @@ class MostVisitedSites : public sync_driver::SyncServiceObserver,
void OnSuggestionsProfileAvailable(
const suggestions::SuggestionsProfile& suggestions_profile);
+ void AddPopularSites(std::vector<base::string16>* titles,
+ std::vector<std::string>* urls);
+
// Notify the Java side observer about the availability of Most Visited Urls.
void NotifyMostVisitedURLsObserver(const std::vector<base::string16>& titles,
const std::vector<std::string>& urls);
+ void OnPopularSitesAvailable(bool success);
+
// Runs on the UI Thread.
void OnLocalThumbnailFetched(
const GURL& url,
@@ -123,6 +135,8 @@ class MostVisitedSites : public sync_driver::SyncServiceObserver,
MostVisitedSource mv_source_;
+ scoped_ptr<PopularSites> popular_sites_;
+
// For callbacks may be run after destruction.
base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698