| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 { | 257 { |
| 258 return wrapUnique(new ReaderImpl(client, this, m_handle->obtainReader(cl
ient))); | 258 return wrapUnique(new ReaderImpl(client, this, m_handle->obtainReader(cl
ient))); |
| 259 } | 259 } |
| 260 | 260 |
| 261 private: | 261 private: |
| 262 void ensureStartLoader() | 262 void ensureStartLoader() |
| 263 { | 263 { |
| 264 if (m_loaderStarted) | 264 if (m_loaderStarted) |
| 265 return; | 265 return; |
| 266 m_loaderStarted = true; | 266 m_loaderStarted = true; |
| 267 m_loaderContextHolder->postTask(threadSafeBind(&LoaderContext::start)); | 267 m_loaderContextHolder->postTask(crossThreadBind(&LoaderContext::start)); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void clearBlobDataHandleForDrain() | 270 void clearBlobDataHandleForDrain() |
| 271 { | 271 { |
| 272 m_blobDataHandleForDrain.clear(); | 272 m_blobDataHandleForDrain.clear(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 bool drained() const { return m_drained; } | 275 bool drained() const { return m_drained; } |
| 276 void setDrained() { m_drained = true; } | 276 void setDrained() { m_drained = true; } |
| 277 | 277 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 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 FetchDataConsumerHandle::Reader* FetchBlobDataConsumerHandle::obtainReaderIntern
al(Client* client) |
| 312 { | 312 { |
| 313 return m_readerContext->obtainReader(client).release(); | 313 return m_readerContext->obtainReader(client).release(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 } // namespace blink | 316 } // namespace blink |
| OLD | NEW |