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

Unified Diff: chrome/browser/bitmap_fetcher/bitmap_fetcher.h

Issue 931993002: Make image_decoder a Leaky LazyInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few comments Created 5 years, 9 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
« no previous file with comments | « chrome/browser/apps/drive/drive_app_converter.cc ('k') | chrome/browser/bitmap_fetcher/bitmap_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bitmap_fetcher/bitmap_fetcher.h
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
index ac26bbf6d36d4a9d0c5c79bb8cbd00b3699acfdb..11055eaf61a50e8aaf7a051e629858c5435e7de5 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
@@ -23,7 +23,7 @@ namespace chrome {
// Asynchrounously fetches an image from the given URL and returns the
// decoded Bitmap to the provided BitmapFetcherDelegate.
class BitmapFetcher : public net::URLFetcherDelegate,
- public ImageDecoder::Delegate {
+ public ImageDecoder::ImageRequest {
public:
BitmapFetcher(const GURL& url, BitmapFetcherDelegate* delegate);
~BitmapFetcher() override;
@@ -54,23 +54,21 @@ class BitmapFetcher : public net::URLFetcherDelegate,
int64 current,
int64 total) override;
- // Methods inherited from ImageDecoder::Delegate
+ // Methods inherited from ImageDecoder::ImageRequest
// Called when image is decoded. |decoder| is used to identify the image in
// case of decoding several images simultaneously. This will not be called
// on the UI thread.
- void OnImageDecoded(const ImageDecoder* decoder,
- const SkBitmap& decoded_image) override;
+ void OnImageDecoded(const SkBitmap& decoded_image) override;
// Called when decoding image failed.
- void OnDecodeImageFailed(const ImageDecoder* decoder) override;
+ void OnDecodeImageFailed() override;
private:
// Alerts the delegate that a failure occurred.
void ReportFailure();
scoped_ptr<net::URLFetcher> url_fetcher_;
- scoped_refptr<ImageDecoder> image_decoder_;
const GURL url_;
BitmapFetcherDelegate* const delegate_;
« no previous file with comments | « chrome/browser/apps/drive/drive_app_converter.cc ('k') | chrome/browser/bitmap_fetcher/bitmap_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698