Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: services/image_decoder/image_decoder_impl.h

Issue 1028543002: Turn the utility process image decoder into a Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up and add test. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 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(bool, 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698