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

Side by Side Diff: chrome/browser/search/suggestions/image_manager.h

Issue 392983007: [Suggestions] Make ThumbnailManager implement ImageManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
huangs 2014/07/16 22:22:23 Should this file live outside Chrome?
Mathieu 2014/07/17 16:06:35 Yes it will move inside a component soon, next CL.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_MANAGER_H_
6 #define CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_MANAGER_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h"
11 #include "ui/gfx/image/image_skia.h"
12 #include "url/gurl.h"
13
14 namespace suggestions {
15
16 // An interface to retrieve images related to a specific URL.
17 class ImageManager {
18 public:
19 virtual ~ImageManager() {}
20
21 // Initializes the internal image map with the proper mapping from website
22 // URL to image URL.
23 virtual void InitializeImageMap(const SuggestionsProfile& suggestions) = 0;
huangs 2014/07/16 22:22:24 Should the concept of "image map" be a generic int
Mathieu 2014/07/17 16:06:35 Discussed offline.
24
25 // Retrieves stored image for website |url| asynchronously. Calls
26 // |callback| with Bitmap pointer if found, and NULL otherwise. Should be
huangs 2014/07/16 22:22:23 NIT: unwrap |callback| to previous line.
Mathieu 2014/07/17 16:06:35 Done.
27 // called from the UI thread.
28 virtual void GetImageForURL(
huangs 2014/07/16 22:22:24 Would "UI thread" be a Chrome (even browser) conce
Mathieu 2014/07/17 16:06:35 Done.
29 const GURL& url,
30 base::Callback<void(const GURL&, const SkBitmap*)> callback) = 0;
31 };
huangs 2014/07/16 22:22:23 DISALLOW_COPY_AND_ASSIGN ?
Mathieu 2014/07/17 16:06:35 Done.
32
33 } // namespace suggestions
34
35 #endif // CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698