| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_IMAGE_FETCHER_CONTENT_IMAGE_DECODER_IMPL_H_ |
| 6 #define COMPONENTS_IMAGE_FETCHER_CONTENT_IMAGE_DECODER_IMPL_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "components/image_fetcher/content/image_decoder.h" |
| 13 #include "components/image_fetcher/core/image_decoder.h" |
| 14 |
| 15 namespace image_fetcher { |
| 16 |
| 17 // ImageDecoder implementation. |
| 18 class ImageDecoderImpl : public ImageDecoder { |
| 19 public: |
| 20 ImageDecoderImpl(); |
| 21 ~ImageDecoderImpl() override; |
| 22 |
| 23 void DecodeImage(const std::string& image_data, |
| 24 const gfx::Size& desired_image_frame_size, |
| 25 const ImageDecodedCallback& callback) override; |
| 26 |
| 27 private: |
| 28 class DecodeImageRequest; |
| 29 |
| 30 // Removes the passed image decode |request| from the internal request queue. |
| 31 void RemoveDecodeImageRequest(DecodeImageRequest* request); |
| 32 |
| 33 // All active image decoding requests. |
| 34 std::vector<std::unique_ptr<DecodeImageRequest>> decode_image_requests_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl); |
| 37 }; |
| 38 |
| 39 } // namespace image_fetcher |
| 40 |
| 41 #endif // COMPONENTS_IMAGE_FETCHER_CONTENT_IMAGE_DECODER_IMPL_H_ |
| OLD | NEW |