OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "modules/fetch/FetchBlobDataConsumerHandle.h" | 5 #include "modules/fetch/FetchBlobDataConsumerHandle.h" |
6 | 6 |
7 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
8 #include "core/fetch/FetchInitiatorTypeNames.h" | 8 #include "core/fetch/FetchInitiatorTypeNames.h" |
9 #include "core/loader/ThreadableLoaderClient.h" | 9 #include "core/loader/ThreadableLoaderClient.h" |
10 #include "modules/fetch/CompositeDataConsumerHandle.h" | 10 #include "modules/fetch/CompositeDataConsumerHandle.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 } | 301 } |
302 | 302 |
303 std::unique_ptr<FetchDataConsumerHandle> FetchBlobDataConsumerHandle::create(Exe
cutionContext* executionContext, PassRefPtr<BlobDataHandle> blobDataHandle) | 303 std::unique_ptr<FetchDataConsumerHandle> FetchBlobDataConsumerHandle::create(Exe
cutionContext* executionContext, PassRefPtr<BlobDataHandle> blobDataHandle) |
304 { | 304 { |
305 if (!blobDataHandle) | 305 if (!blobDataHandle) |
306 return createFetchDataConsumerHandleFromWebHandle(createDoneDataConsumer
Handle()); | 306 return createFetchDataConsumerHandleFromWebHandle(createDoneDataConsumer
Handle()); |
307 | 307 |
308 return wrapUnique(new FetchBlobDataConsumerHandle(executionContext, blobData
Handle, new DefaultLoaderFactory)); | 308 return wrapUnique(new FetchBlobDataConsumerHandle(executionContext, blobData
Handle, new DefaultLoaderFactory)); |
309 } | 309 } |
310 | 310 |
311 FetchDataConsumerHandle::Reader* FetchBlobDataConsumerHandle::obtainReaderIntern
al(Client* client) | 311 std::unique_ptr<FetchDataConsumerHandle::Reader> FetchBlobDataConsumerHandle::ob
tainFetchDataReader(Client* client) |
312 { | 312 { |
313 return m_readerContext->obtainReader(client).release(); | 313 return m_readerContext->obtainReader(client); |
314 } | 314 } |
315 | 315 |
316 } // namespace blink | 316 } // namespace blink |
OLD | NEW |