| Index: components/image_fetcher/content/image_decoder_impl.h
|
| diff --git a/components/image_fetcher/content/image_decoder_impl.h b/components/image_fetcher/content/image_decoder_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8e47b3b4b0ed94dfb1865f1f550e8bf88955e5ae
|
| --- /dev/null
|
| +++ b/components/image_fetcher/content/image_decoder_impl.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_IMAGE_FETCHER_CONTENT_IMAGE_DECODER_IMPL_H_
|
| +#define COMPONENTS_IMAGE_FETCHER_CONTENT_IMAGE_DECODER_IMPL_H_
|
| +
|
| +#include <memory>
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "components/image_fetcher/content/image_decoder.h"
|
| +#include "components/image_fetcher/core/image_decoder.h"
|
| +
|
| +namespace image_fetcher {
|
| +
|
| +// ImageDecoder implementation.
|
| +class ImageDecoderImpl : public ImageDecoder {
|
| + public:
|
| + ImageDecoderImpl();
|
| + ~ImageDecoderImpl() override;
|
| +
|
| + void DecodeImage(const std::string& image_data,
|
| + const gfx::Size& desired_image_frame_size,
|
| + const ImageDecodedCallback& callback) override;
|
| +
|
| + private:
|
| + class DecodeImageRequest;
|
| +
|
| + // Removes the passed image decode |request| from the internal request queue.
|
| + void RemoveDecodeImageRequest(DecodeImageRequest* request);
|
| +
|
| + // All active image decoding requests.
|
| + std::vector<std::unique_ptr<DecodeImageRequest>> decode_image_requests_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl);
|
| +};
|
| +
|
| +} // namespace image_fetcher
|
| +
|
| +#endif // COMPONENTS_IMAGE_FETCHER_CONTENT_IMAGE_DECODER_IMPL_H_
|
|
|