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

Side by Side Diff: components/webp_transcode/webp_decoder.h

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_ 5 #ifndef COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_
6 #define COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_ 6 #define COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <memory>
12
11 #include "base/mac/scoped_nsobject.h" 13 #include "base/mac/scoped_nsobject.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "third_party/libwebp/webp/decode.h" 15 #include "third_party/libwebp/webp/decode.h"
15 16
16 @class NSData; 17 @class NSData;
17 18
18 namespace webp_transcode { 19 namespace webp_transcode {
19 20
20 // Decodes a WebP image into either JPEG, PNG or uncompressed TIFF. 21 // Decodes a WebP image into either JPEG, PNG or uncompressed TIFF.
21 class WebpDecoder : public base::RefCountedThreadSafe<WebpDecoder> { 22 class WebpDecoder : public base::RefCountedThreadSafe<WebpDecoder> {
22 public: 23 public:
23 // Format of the decoded image. 24 // Format of the decoded image.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual ~WebpDecoder(); 60 virtual ~WebpDecoder();
60 61
61 // Implements WebP image decoding state machine steps. 62 // Implements WebP image decoding state machine steps.
62 void DoReadFeatures(NSData* data); 63 void DoReadFeatures(NSData* data);
63 void DoReadData(NSData* data); 64 void DoReadData(NSData* data);
64 bool DoSendData(); 65 bool DoSendData();
65 66
66 scoped_refptr<WebpDecoder::Delegate> delegate_; 67 scoped_refptr<WebpDecoder::Delegate> delegate_;
67 WebPDecoderConfig config_; 68 WebPDecoderConfig config_;
68 WebpDecoder::State state_; 69 WebpDecoder::State state_;
69 scoped_ptr<WebPIDecoder, WebPIDecoderDeleter> incremental_decoder_; 70 std::unique_ptr<WebPIDecoder, WebPIDecoderDeleter> incremental_decoder_;
70 base::scoped_nsobject<NSData> output_buffer_; 71 base::scoped_nsobject<NSData> output_buffer_;
71 base::scoped_nsobject<NSMutableData> features_; 72 base::scoped_nsobject<NSMutableData> features_;
72 int has_alpha_; 73 int has_alpha_;
73 }; 74 };
74 75
75 } // namespace webp_transcode 76 } // namespace webp_transcode
76 77
77 #endif // COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_ 78 #endif // COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_
OLDNEW
« no previous file with comments | « components/webdata_services/web_data_service_wrapper.cc ('k') | components/webp_transcode/webp_decoder_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698