| Index: webkit/glue/multi_resolution_image_resource_fetcher.h
|
| diff --git a/webkit/glue/image_resource_fetcher.h b/webkit/glue/multi_resolution_image_resource_fetcher.h
|
| similarity index 57%
|
| copy from webkit/glue/image_resource_fetcher.h
|
| copy to webkit/glue/multi_resolution_image_resource_fetcher.h
|
| index d1a4f7d6eac8c38f2cd3edd0b36da59cdeb21286..23f8073fb55ecdd7a88eed007569186eea7a511e 100644
|
| --- a/webkit/glue/image_resource_fetcher.h
|
| +++ b/webkit/glue/multi_resolution_image_resource_fetcher.h
|
| @@ -2,8 +2,10 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
|
| -#define WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
|
| +#ifndef WEBKIT_GLUE_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
|
| +#define WEBKIT_GLUE_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
|
| +
|
| +#include <vector>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/callback.h"
|
| @@ -14,22 +16,21 @@ class SkBitmap;
|
|
|
| namespace webkit_glue {
|
|
|
| -// ImageResourceFetcher handles downloading an image for a webview. Once
|
| -// downloading is done the supplied callback is notified. ImageResourceFetcher
|
| -// is used to download the favicon and images for web apps.
|
| -class ImageResourceFetcher {
|
| +// A resource fetcher that returns all (differently-sized) frames in
|
| +// an image. Useful for favicons.
|
| +class MultiResolutionImageResourceFetcher{
|
| public:
|
| - typedef base::Callback<void(ImageResourceFetcher*, const SkBitmap&)> Callback;
|
| + typedef base::Callback<void(MultiResolutionImageResourceFetcher*,
|
| + const std::vector<SkBitmap>&)> Callback;
|
|
|
| - WEBKIT_GLUE_EXPORT ImageResourceFetcher(
|
| + WEBKIT_GLUE_EXPORT MultiResolutionImageResourceFetcher(
|
| const GURL& image_url,
|
| WebKit::WebFrame* frame,
|
| int id,
|
| - int image_size,
|
| WebKit::WebURLRequest::TargetType target_type,
|
| const Callback& callback);
|
|
|
| - WEBKIT_GLUE_EXPORT virtual ~ImageResourceFetcher();
|
| + WEBKIT_GLUE_EXPORT virtual ~MultiResolutionImageResourceFetcher();
|
|
|
| // URL of the image we're downloading.
|
| const GURL& image_url() const { return image_url_; }
|
| @@ -50,17 +51,12 @@ class ImageResourceFetcher {
|
| // URL of the image.
|
| const GURL image_url_;
|
|
|
| - // The size of the image. This is only a hint that is used if the image
|
| - // contains multiple sizes. A value of 0 results in using the first frame
|
| - // of the image.
|
| - const int image_size_;
|
| -
|
| // Does the actual download.
|
| scoped_ptr<ResourceFetcher> fetcher_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ImageResourceFetcher);
|
| + DISALLOW_COPY_AND_ASSIGN(MultiResolutionImageResourceFetcher);
|
| };
|
|
|
| } // namespace webkit_glue
|
|
|
| -#endif // WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
|
| +#endif // WEBKIT_GLUE_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
|
|
|