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

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: rebase 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/android/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dd34d26ff3d623f74fe7a27bfa26c47580f9547a 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 GURL;
+class PopularSites;
+
// 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_;
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/android/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698