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

Side by Side Diff: components/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: Rebase and address comments. Created 5 years, 6 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
« no previous file with comments | « components/image_decoder/DEPS ('k') | components/image_decoder/image_decoder_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_IMAGE_DECODER_IMAGE_DECODER_IMPL_H_
6 #define COMPONENTS_IMAGE_DECODER_IMAGE_DECODER_IMPL_H_
7
8 #include "base/macros.h"
9 #include "components/image_decoder/public/interfaces/image_decoder.mojom.h"
10 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
11
12 namespace image_decoder {
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 image_decoder::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 image_decoder
36
37 #endif // COMPONENTS_IMAGE_DECODER_IMAGE_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « components/image_decoder/DEPS ('k') | components/image_decoder/image_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698