| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
| 6 #include "modules/serviceworkers/Body.h" | 6 #include "modules/fetch/Body.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| 11 #include "bindings/core/v8/V8ArrayBuffer.h" | 11 #include "bindings/core/v8/V8ArrayBuffer.h" |
| 12 #include "bindings/core/v8/V8ThrowException.h" | 12 #include "bindings/core/v8/V8ThrowException.h" |
| 13 #include "core/dom/DOMArrayBuffer.h" | 13 #include "core/dom/DOMArrayBuffer.h" |
| 14 #include "core/fileapi/Blob.h" | 14 #include "core/fileapi/Blob.h" |
| 15 #include "core/fileapi/FileReaderLoader.h" | 15 #include "core/fileapi/FileReaderLoader.h" |
| 16 #include "core/fileapi/FileReaderLoaderClient.h" | 16 #include "core/fileapi/FileReaderLoaderClient.h" |
| 17 #include "core/streams/UnderlyingSource.h" | 17 #include "core/streams/UnderlyingSource.h" |
| 18 #include "modules/serviceworkers/BodyStreamBuffer.h" | 18 #include "modules/fetch/BodyStreamBuffer.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 class Body::BlobHandleReceiver final : public BodyStreamBuffer::BlobHandleCreato
rClient { | 22 class Body::BlobHandleReceiver final : public BodyStreamBuffer::BlobHandleCreato
rClient { |
| 23 public: | 23 public: |
| 24 explicit BlobHandleReceiver(Body* body) | 24 explicit BlobHandleReceiver(Body* body) |
| 25 : m_body(body) | 25 : m_body(body) |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 void didCreateBlobHandle(PassRefPtr<BlobDataHandle> handle) override | 28 void didCreateBlobHandle(PassRefPtr<BlobDataHandle> handle) override |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 430 |
| 431 void Body::didBlobHandleReceiveError(PassRefPtrWillBeRawPtr<DOMException> except
ion) | 431 void Body::didBlobHandleReceiveError(PassRefPtrWillBeRawPtr<DOMException> except
ion) |
| 432 { | 432 { |
| 433 if (!m_resolver) | 433 if (!m_resolver) |
| 434 return; | 434 return; |
| 435 m_resolver->reject(exception); | 435 m_resolver->reject(exception); |
| 436 m_resolver.clear(); | 436 m_resolver.clear(); |
| 437 } | 437 } |
| 438 | 438 |
| 439 } // namespace blink | 439 } // namespace blink |
| OLD | NEW |