Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ | 5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ |
| 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ | 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 class GURL; | 10 class GURL; |
| 11 class SkBitmap; | 11 |
| 12 namespace gfx { | |
| 13 class Image; | |
| 14 } | |
| 12 | 15 |
| 13 namespace image_fetcher { | 16 namespace image_fetcher { |
| 14 | 17 |
| 15 class ImageFetcherDelegate { | 18 class ImageFetcherDelegate { |
| 16 public: | 19 public: |
| 17 ImageFetcherDelegate() {} | 20 ImageFetcherDelegate() {} |
| 18 | 21 |
| 19 // Called when an image was fetched. |url| represents the website for which | 22 // Called when an image was fetched. |url| represents the website for which |
| 20 // the image was fetched. |bitmap| stores image data owned by the caller, and | 23 // the image was fetched. |bitmap| stores image data owned by the caller, and |
|
Marc Treib
2016/05/13 15:54:00
nit: Update the comment please
markusheintz_
2016/05/17 13:08:22
Done.
| |
| 21 // can be nullptr. | 24 // can be nullptr. |
| 22 virtual void OnImageFetched(const GURL& url, const SkBitmap* bitmap) = 0; | 25 virtual void OnImageFetched(const GURL& url, const gfx::Image& image) = 0; |
| 23 | 26 |
| 24 protected: | 27 protected: |
| 25 virtual ~ImageFetcherDelegate() {} | 28 virtual ~ImageFetcherDelegate() {} |
| 26 | 29 |
| 27 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate); | 30 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate); |
| 28 }; | 31 }; |
| 29 | 32 |
| 30 } // namespace image_fetcher | 33 } // namespace image_fetcher |
| 31 | 34 |
| 32 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ | 35 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ |
| OLD | NEW |