| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ | 5 #ifndef CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ |
| 6 #define CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ | 6 #define CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/common/image_decoder.mojom.h" | 9 #include "chrome/common/image_decoder.mojom.h" |
| 10 | 10 |
| 11 class ImageDecoderImpl : public mojom::ImageDecoder { | 11 class ImageDecoderImpl : public mojom::ImageDecoder { |
| 12 public: | 12 public: |
| 13 ImageDecoderImpl(); | 13 ImageDecoderImpl(); |
| 14 explicit ImageDecoderImpl(int64_t max_message_size); | 14 explicit ImageDecoderImpl(int64_t max_message_size); |
| 15 ~ImageDecoderImpl() override; | 15 ~ImageDecoderImpl() override; |
| 16 | 16 |
| 17 // Overridden from mojom::ImageDecoder: | 17 // Overridden from mojom::ImageDecoder: |
| 18 void DecodeImage( | 18 void DecodeImage(const std::vector<uint8_t>& encoded_data, |
| 19 mojo::Array<uint8_t> encoded_data, | 19 mojom::ImageCodec codec, |
| 20 mojom::ImageCodec codec, | 20 bool shrink_to_fit, |
| 21 bool shrink_to_fit, | 21 const DecodeImageCallback& callback) override; |
| 22 const DecodeImageCallback& callback) override; | |
| 23 | 22 |
| 24 private: | 23 private: |
| 25 int64_t max_message_size_; | 24 int64_t max_message_size_; |
| 26 | 25 |
| 27 DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl); | 26 DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl); |
| 28 }; | 27 }; |
| 29 | 28 |
| 30 #endif // CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ | 29 #endif // CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ |
| OLD | NEW |