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

Side by Side Diff: chrome/utility/image_decoder_impl.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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 | « chrome/utility/chrome_content_utility_client.cc ('k') | chrome/utility/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
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 #include "mojo/public/cpp/bindings/strong_binding.h"
11 10
12 class ImageDecoderImpl : public mojom::ImageDecoder { 11 class ImageDecoderImpl : public mojom::ImageDecoder {
13 public: 12 public:
13 ImageDecoderImpl();
14 explicit ImageDecoderImpl(int64_t max_message_size); 14 explicit ImageDecoderImpl(int64_t max_message_size);
15 explicit ImageDecoderImpl(
16 mojo::InterfaceRequest<mojom::ImageDecoder> request);
17 ~ImageDecoderImpl() override; 15 ~ImageDecoderImpl() override;
18 16
19 // Overridden from mojom::ImageDecoder: 17 // Overridden from mojom::ImageDecoder:
20 void DecodeImage( 18 void DecodeImage(
21 mojo::Array<uint8_t> encoded_data, 19 mojo::Array<uint8_t> encoded_data,
22 mojom::ImageCodec codec, 20 mojom::ImageCodec codec,
23 bool shrink_to_fit, 21 bool shrink_to_fit,
24 const DecodeImageCallback& callback) override; 22 const DecodeImageCallback& callback) override;
25 23
26 private: 24 private:
27 int64_t max_message_size_; 25 int64_t max_message_size_;
28 mojo::StrongBinding<ImageDecoder> binding_;
29 26
30 DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl); 27 DISALLOW_COPY_AND_ASSIGN(ImageDecoderImpl);
31 }; 28 };
32 29
33 #endif // CHROME_UTILITY_IMAGE_DECODER_IMPL_H_ 30 #endif // CHROME_UTILITY_IMAGE_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | chrome/utility/image_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698