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

Side by Side Diff: components/suggestions/image_manager.h

Issue 410673002: [Suggestions] Moving suggestions code to a new component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix deps Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SEARCH_SUGGESTIONS_IMAGE_MANAGER_H_ 5 #ifndef COMPONENTS_SUGGESTIONS_IMAGE_MANAGER_H_
6 #define CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_MANAGER_H_ 6 #define COMPONENTS_SUGGESTIONS_IMAGE_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" 10 #include "components/suggestions/proto/suggestions.pb.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace suggestions { 14 namespace suggestions {
15 15
16 // An interface to retrieve images related to a specific URL. 16 // An interface to retrieve images related to a specific URL.
17 class ImageManager { 17 class ImageManager {
18 public: 18 public:
19 ImageManager() {} 19 ImageManager() {}
20 virtual ~ImageManager() {} 20 virtual ~ImageManager() {}
21 21
22 // (Re)Initializes states using data received from a SuggestionService. We're 22 // (Re)Initializes states using data received from a SuggestionService. We're
23 // not doing this in the constructor because an instance may be long-lived. 23 // not doing this in the constructor because an instance may be long-lived.
24 virtual void Initialize(const SuggestionsProfile& suggestions) = 0; 24 virtual void Initialize(const SuggestionsProfile& suggestions) = 0;
25 25
26 // Retrieves stored image for website |url| asynchronously. Calls |callback| 26 // Retrieves stored image for website |url| asynchronously. Calls |callback|
27 // with Bitmap pointer if found, and NULL otherwise. 27 // with Bitmap pointer if found, and NULL otherwise.
28 virtual void GetImageForURL( 28 virtual void GetImageForURL(
29 const GURL& url, 29 const GURL& url,
30 base::Callback<void(const GURL&, const SkBitmap*)> callback) = 0; 30 base::Callback<void(const GURL&, const SkBitmap*)> callback) = 0;
31 31
32 private: 32 private:
33 DISALLOW_COPY_AND_ASSIGN(ImageManager); 33 DISALLOW_COPY_AND_ASSIGN(ImageManager);
34 }; 34 };
35 35
36 } // namespace suggestions 36 } // namespace suggestions
37 37
38 #endif // CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_MANAGER_H_ 38 #endif // COMPONENTS_SUGGESTIONS_IMAGE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/suggestions/blacklist_store_unittest.cc ('k') | components/suggestions/proto/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698