OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 SERVICES_IMAGE_DECODER_IMAGE_DECODER_IMPL_H_ |
| 6 #define SERVICES_IMAGE_DECODER_IMAGE_DECODER_IMPL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "services/image_decoder/public/interfaces/image_decoder.mojom.h" |
| 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
| 11 |
| 12 namespace services { |
| 13 |
| 14 class ImageDecoderImpl : public ImageDecoder { |
| 15 public: |
| 16 explicit ImageDecoderImpl(int64_t max_message_size); |
| 17 explicit ImageDecoderImpl(mojo::InterfaceRequest<ImageDecoder> request); |
| 18 ~ImageDecoderImpl() override; |
| 19 |
| 20 // Public for testing. |
| 21 // Overridden from services::ImageDecoder: |
| 22 void DecodeImage( |
| 23 mojo::Array<uint8_t> encoded_data, |
| 24 ImageCodec codec, |
| 25 bool shrink_to_fit, |
| 26 const mojo::Callback<void(skia::BitmapPtr)>& callback) override; |
| 27 |
| 28 private: |
| 29 int64_t max_message_size_; |
| 30 mojo::StrongBinding<ImageDecoder> binding_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl); |
| 33 }; |
| 34 |
| 35 } // namespace services |
| 36 |
| 37 #endif // SERVICES_IMAGE_DECODER_IMAGE_DECODER_IMPL_H_ |
OLD | NEW |