| Index: components/image_fetcher/image_fetcher_delegate.h
|
| diff --git a/components/image_fetcher/image_fetcher_delegate.h b/components/image_fetcher/image_fetcher_delegate.h
|
| index dc5b83fbea9a2c90beed04bf02b2c745785abf31..38d66b29543987477deaa42660f306e40d538aa4 100644
|
| --- a/components/image_fetcher/image_fetcher_delegate.h
|
| +++ b/components/image_fetcher/image_fetcher_delegate.h
|
| @@ -5,9 +5,9 @@
|
| #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
|
| #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
|
|
|
| -#include "base/macros.h"
|
| +#include <string>
|
|
|
| -class GURL;
|
| +#include "base/macros.h"
|
|
|
| namespace gfx {
|
| class Image;
|
| @@ -19,11 +19,18 @@ class ImageFetcherDelegate {
|
| public:
|
| ImageFetcherDelegate() {}
|
|
|
| - // Called when an image was fetched. |id| is an identifier for the fetch (as
|
| - // passed to ImageFetcher::StartOrQueueNetworkRequest); |image| stores image
|
| - // data owned by the caller, and can be an empty gfx::Image.
|
| + // Called when the data for an image was fetched. |id| is an identifier for
|
| + // the fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |data|
|
| + // stores (generally compressed) image data owned by the caller, and can be
|
| + // empty if the fetch failed.
|
| + virtual void OnImageDataFetched(const std::string& id,
|
| + const std::string& data) {};
|
| +
|
| + // Called when an image was fetched and decoded. |id| is an identifier for the
|
| + // fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |image|
|
| + // stores image data owned by the caller, and can be an empty gfx::Image.
|
| virtual void OnImageFetched(const std::string& id,
|
| - const gfx::Image& image) = 0;
|
| + const gfx::Image& image) {};
|
|
|
| protected:
|
| virtual ~ImageFetcherDelegate() {}
|
|
|