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

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: First attempt to land. 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 size_t m_decodedOffset; 153 size_t m_decodedOffset;
153 154
154 // Which type of file (ICO/CUR) this is. 155 // Which type of file (ICO/CUR) this is.
155 FileType m_fileType; 156 FileType m_fileType;
156 157
157 // The headers for the ICO. 158 // The headers for the ICO.
158 typedef Vector<IconDirectoryEntry> IconDirectoryEntries; 159 typedef Vector<IconDirectoryEntry> IconDirectoryEntries;
159 IconDirectoryEntries m_dirEntries; 160 IconDirectoryEntries m_dirEntries;
160 161
161 // The image decoders for the various frames. 162 // The image decoders for the various frames.
162 typedef Vector<OwnPtr<BMPImageReader>> BMPReaders; 163 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders;
163 BMPReaders m_bmpReaders; 164 BMPReaders m_bmpReaders;
164 typedef Vector<OwnPtr<PNGImageDecoder>> PNGDecoders; 165 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders;
165 PNGDecoders m_pngDecoders; 166 PNGDecoders m_pngDecoders;
166 167
167 // Valid only while a BMPImageReader is decoding, this holds the size 168 // Valid only while a BMPImageReader is decoding, this holds the size
168 // for the particular entry being decoded. 169 // for the particular entry being decoded.
169 IntSize m_frameSize; 170 IntSize m_frameSize;
170 }; 171 };
171 172
172 } // namespace blink 173 } // namespace blink
173 174
174 #endif 175 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698