| Index: chrome/browser/search/suggestions/image_decoder_impl.h
|
| diff --git a/chrome/browser/search/suggestions/image_decoder_impl.h b/chrome/browser/search/suggestions/image_decoder_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3744185403f2d8a6828574d0463817cfaf6b12a5
|
| --- /dev/null
|
| +++ b/chrome/browser/search/suggestions/image_decoder_impl.h
|
| @@ -0,0 +1,43 @@
|
| +// 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 CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_DECODER_IMPL_H_
|
| +#define CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_DECODER_IMPL_H_
|
| +
|
| +#include <memory>
|
| +#include <vector>
|
| +
|
| +#include "chrome/browser/image_decoder.h"
|
| +#include "components/image_fetcher/image_decoder.h"
|
| +
|
| +class SkBitmap;
|
| +
|
| +namespace suggestions {
|
| +
|
| +// image_fetcher::ImageDecoder Implementation.
|
| +class ImageDecoderImpl : public image_fetcher::ImageDecoder {
|
| + public:
|
| + ImageDecoderImpl();
|
| + ~ImageDecoderImpl() override;
|
| +
|
| + void DecodeImage(
|
| + const std::string& image_data,
|
| + const image_fetcher::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 suggestions
|
| +
|
| +#endif // CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_DECODER_IMPL_H_
|
| +
|
|
|