Chromium Code Reviews| 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_; |