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

Unified Diff: chrome/browser/search/suggestions/suggestions_service.h

Issue 299713007: [Suggestions] Adding a Thumbnail Manager for the Suggestions Service (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now swapping Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/suggestions/suggestions_service.h
diff --git a/chrome/browser/search/suggestions/suggestions_service.h b/chrome/browser/search/suggestions/suggestions_service.h
index 972cfce63ada136e3d84343cdcf43cd140f1c4e4..f74c4cbadf2b27d5b7c7a84129c659b2d7eca7aa 100644
--- a/chrome/browser/search/suggestions/suggestions_service.h
+++ b/chrome/browser/search/suggestions/suggestions_service.h
@@ -13,8 +13,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "chrome/browser/search/suggestions/proto/suggestions.pb.h"
+#include "chrome/browser/search/suggestions/thumbnail_manager.h"
#include "components/keyed_service/core/keyed_service.h"
#include "net/url_request/url_fetcher_delegate.h"
+#include "ui/gfx/image/image_skia.h"
#include "url/gurl.h"
class Profile;
@@ -43,6 +45,12 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
// fetch request completes.
void FetchSuggestionsData(ResponseCallback callback);
+ // Retrieves stored thumbnail for website |url| asynchronously. Calls
+ // |callback| with Bitmap pointer if found, and NULL otherwise.
+ void GetPageThumbnail(
+ const GURL& url,
+ base::Callback<void(const GURL&, const SkBitmap*)> callback);
+
private:
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData);
@@ -68,6 +76,9 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
// Queue of callbacks. These are flushed when fetch request completes.
std::vector<ResponseCallback> waiting_requestors_;
+ // Used to obtain server thumbnails, if available.
+ scoped_ptr<ThumbnailManager> thumbnail_manager_;
+
Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(SuggestionsService);
« no previous file with comments | « chrome/browser/search/suggestions/proto/suggestions.proto ('k') | chrome/browser/search/suggestions/suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698