Update V8 to version 3.29.50 (based on bleeding_edge revision r23756).
[chromium-blink-merge.git] / components / suggestions / image_manager.h
blob8c09fdfce416e0e9995bcad227952a16fe718b84
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SUGGESTIONS_IMAGE_MANAGER_H_
6 #define COMPONENTS_SUGGESTIONS_IMAGE_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "components/suggestions/proto/suggestions.pb.h"
11 #include "ui/gfx/image/image_skia.h"
12 #include "url/gurl.h"
14 namespace suggestions {
16 // An interface to retrieve images related to a specific URL.
17 class ImageManager {
18 public:
19 ImageManager() {}
20 virtual ~ImageManager() {}
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.
24 virtual void Initialize(const SuggestionsProfile& suggestions) = 0;
26 // Retrieves stored image for website |url| asynchronously. Calls |callback|
27 // with Bitmap pointer if found, and NULL otherwise.
28 virtual void GetImageForURL(
29 const GURL& url,
30 base::Callback<void(const GURL&, const SkBitmap*)> callback) = 0;
32 private:
33 DISALLOW_COPY_AND_ASSIGN(ImageManager);
36 } // namespace suggestions
38 #endif // COMPONENTS_SUGGESTIONS_IMAGE_MANAGER_H_