| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |