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

Side by Side Diff: chrome/browser/android/ntp/most_visited_sites.h

Issue 2012473002: Remove NTP dependency on //content/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ 5 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_
6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ 6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Suggestion(); 117 Suggestion();
118 ~Suggestion(); 118 ~Suggestion();
119 119
120 Suggestion(Suggestion&&); 120 Suggestion(Suggestion&&);
121 Suggestion& operator=(Suggestion&&); 121 Suggestion& operator=(Suggestion&&);
122 122
123 private: 123 private:
124 DISALLOW_COPY_AND_ASSIGN(Suggestion); 124 DISALLOW_COPY_AND_ASSIGN(Suggestion);
125 }; 125 };
126 126
127 MostVisitedSites(PrefService* prefs, 127 MostVisitedSites(
128 const TemplateURLService* template_url_service, 128 scoped_refptr<base::SingleThreadTaskRunner> ui_thread,
129 variations::VariationsService* variations_service, 129 scoped_refptr<base::SequencedWorkerPool> blocking_pool,
130 net::URLRequestContextGetter* download_context, 130 PrefService* prefs,
131 const base::FilePath& popular_sites_directory, 131 const TemplateURLService* template_url_service,
132 scoped_refptr<history::TopSites> top_sites, 132 variations::VariationsService* variations_service,
133 suggestions::SuggestionsService* suggestions, 133 net::URLRequestContextGetter* download_context,
134 MostVisitedSitesSupervisor* supervisor); 134 const base::FilePath& popular_sites_directory,
135 scoped_refptr<history::TopSites> top_sites,
136 suggestions::SuggestionsService* suggestions,
137 MostVisitedSitesSupervisor* supervisor);
135 138
136 ~MostVisitedSites() override; 139 ~MostVisitedSites() override;
137 140
138 // Does not take ownership of |observer|, which must outlive this object and 141 // Does not take ownership of |observer|, which must outlive this object and
139 // must not be null. 142 // must not be null.
140 void SetMostVisitedURLsObserver(Observer* observer, int num_sites); 143 void SetMostVisitedURLsObserver(Observer* observer, int num_sites);
141 144
142 using ThumbnailCallback = base::Callback< 145 using ThumbnailCallback = base::Callback<
143 void(bool /* is_local_thumbnail */, const SkBitmap* /* bitmap */)>; 146 void(bool /* is_local_thumbnail */, const SkBitmap* /* bitmap */)>;
144 void GetURLThumbnail(const GURL& url, const ThumbnailCallback& callback); 147 void GetURLThumbnail(const GURL& url, const ThumbnailCallback& callback);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 suggestions_subscription_; 267 suggestions_subscription_;
265 268
266 ScopedObserver<history::TopSites, history::TopSitesObserver> scoped_observer_; 269 ScopedObserver<history::TopSites, history::TopSitesObserver> scoped_observer_;
267 270
268 MostVisitedSource mv_source_; 271 MostVisitedSource mv_source_;
269 272
270 std::unique_ptr<PopularSites> popular_sites_; 273 std::unique_ptr<PopularSites> popular_sites_;
271 274
272 SuggestionsVector current_suggestions_; 275 SuggestionsVector current_suggestions_;
273 276
277 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_;
278 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
279
274 // For callbacks may be run after destruction. 280 // For callbacks may be run after destruction.
275 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; 281 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_;
276 282
277 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); 283 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites);
278 }; 284 };
279 285
280 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_ 286 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/ntp/most_visited_sites.cc » ('j') | chrome/browser/android/ntp/popular_sites.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698