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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ICOImageDecoder_h 31 #ifndef ICOImageDecoder_h
32 #define ICOImageDecoder_h 32 #define ICOImageDecoder_h
33 33
34 #include "platform/image-decoders/FastSharedBufferReader.h" 34 #include "platform/image-decoders/FastSharedBufferReader.h"
35 #include "platform/image-decoders/bmp/BMPImageReader.h" 35 #include "platform/image-decoders/bmp/BMPImageReader.h"
36 #include <memory>
36 37
37 namespace blink { 38 namespace blink {
38 39
39 class PNGImageDecoder; 40 class PNGImageDecoder;
40 41
41 // This class decodes the ICO and CUR image formats. 42 // This class decodes the ICO and CUR image formats.
42 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { 43 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder {
43 public: 44 public:
44 ICOImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedBy tes); 45 ICOImageDecoder(AlphaOption, GammaAndColorProfileOption, size_t maxDecodedBy tes);
45 ~ICOImageDecoder() override; 46 ~ICOImageDecoder() override;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 size_t m_decodedOffset; 151 size_t m_decodedOffset;
151 152
152 // Which type of file (ICO/CUR) this is. 153 // Which type of file (ICO/CUR) this is.
153 FileType m_fileType; 154 FileType m_fileType;
154 155
155 // The headers for the ICO. 156 // The headers for the ICO.
156 typedef Vector<IconDirectoryEntry> IconDirectoryEntries; 157 typedef Vector<IconDirectoryEntry> IconDirectoryEntries;
157 IconDirectoryEntries m_dirEntries; 158 IconDirectoryEntries m_dirEntries;
158 159
159 // The image decoders for the various frames. 160 // The image decoders for the various frames.
160 typedef Vector<OwnPtr<BMPImageReader>> BMPReaders; 161 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders;
161 BMPReaders m_bmpReaders; 162 BMPReaders m_bmpReaders;
162 typedef Vector<OwnPtr<PNGImageDecoder>> PNGDecoders; 163 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders;
163 PNGDecoders m_pngDecoders; 164 PNGDecoders m_pngDecoders;
164 165
165 // Valid only while a BMPImageReader is decoding, this holds the size 166 // Valid only while a BMPImageReader is decoding, this holds the size
166 // for the particular entry being decoded. 167 // for the particular entry being decoded.
167 IntSize m_frameSize; 168 IntSize m_frameSize;
168 }; 169 };
169 170
170 } // namespace blink 171 } // namespace blink
171 172
172 #endif 173 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698