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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h

Issue 1981823002: Remove OwnPtr::release() calls in platform/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 static PassOwnPtr<MockImageDecoderFactory> create(MockImageDecoderClient* cl ient, const IntSize& decodedSize) 145 static PassOwnPtr<MockImageDecoderFactory> create(MockImageDecoderClient* cl ient, const IntSize& decodedSize)
146 { 146 {
147 return adoptPtr(new MockImageDecoderFactory(client, decodedSize)); 147 return adoptPtr(new MockImageDecoderFactory(client, decodedSize));
148 } 148 }
149 149
150 PassOwnPtr<ImageDecoder> create() override 150 PassOwnPtr<ImageDecoder> create() override
151 { 151 {
152 OwnPtr<MockImageDecoder> decoder = MockImageDecoder::create(m_client); 152 OwnPtr<MockImageDecoder> decoder = MockImageDecoder::create(m_client);
153 decoder->setSize(m_decodedSize.width(), m_decodedSize.height()); 153 decoder->setSize(m_decodedSize.width(), m_decodedSize.height());
154 return decoder.release(); 154 return std::move(decoder);
155 } 155 }
156 156
157 private: 157 private:
158 MockImageDecoderFactory(MockImageDecoderClient* client, const IntSize& decod edSize) 158 MockImageDecoderFactory(MockImageDecoderClient* client, const IntSize& decod edSize)
159 : m_client(client) 159 : m_client(client)
160 , m_decodedSize(decodedSize) 160 , m_decodedSize(decodedSize)
161 { 161 {
162 } 162 }
163 163
164 MockImageDecoderClient* m_client; 164 MockImageDecoderClient* m_client;
165 IntSize m_decodedSize; 165 IntSize m_decodedSize;
166 }; 166 };
167 167
168 } // namespace blink 168 } // namespace blink
169 169
170 #endif // MockImageDecoder_h 170 #endif // MockImageDecoder_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698