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 "modules/fetch/Response.h" | 5 #include "modules/fetch/Response.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
10 #include "bindings/core/v8/V8ArrayBuffer.h" | 11 #include "bindings/core/v8/V8ArrayBuffer.h" |
11 #include "bindings/core/v8/V8ArrayBufferView.h" | 12 #include "bindings/core/v8/V8ArrayBufferView.h" |
12 #include "bindings/core/v8/V8Binding.h" | 13 #include "bindings/core/v8/V8Binding.h" |
13 #include "bindings/core/v8/V8Blob.h" | 14 #include "bindings/core/v8/V8Blob.h" |
14 #include "bindings/core/v8/V8FormData.h" | 15 #include "bindings/core/v8/V8FormData.h" |
15 #include "bindings/core/v8/V8HiddenValue.h" | 16 #include "bindings/core/v8/V8HiddenValue.h" |
16 #include "bindings/core/v8/V8URLSearchParams.h" | 17 #include "bindings/core/v8/V8URLSearchParams.h" |
17 #include "bindings/modules/v8/ByteStringSequenceSequenceOrDictionaryOrHeaders.h" | 18 #include "bindings/modules/v8/ByteStringSequenceSequenceOrDictionaryOrHeaders.h" |
18 #include "core/dom/DOMArrayBuffer.h" | 19 #include "core/dom/DOMArrayBuffer.h" |
19 #include "core/dom/DOMArrayBufferView.h" | 20 #include "core/dom/DOMArrayBufferView.h" |
20 #include "core/dom/URLSearchParams.h" | 21 #include "core/dom/URLSearchParams.h" |
21 #include "core/fileapi/Blob.h" | 22 #include "core/fileapi/Blob.h" |
22 #include "core/html/FormData.h" | 23 #include "core/html/FormData.h" |
23 #include "core/streams/ReadableStreamOperations.h" | 24 #include "core/streams/ReadableStreamOperations.h" |
24 #include "modules/fetch/BlobBytesConsumer.h" | 25 #include "modules/fetch/BlobBytesConsumer.h" |
25 #include "modules/fetch/BodyStreamBuffer.h" | 26 #include "modules/fetch/BodyStreamBuffer.h" |
26 #include "modules/fetch/FormDataBytesConsumer.h" | 27 #include "modules/fetch/FormDataBytesConsumer.h" |
27 #include "modules/fetch/ResponseInit.h" | 28 #include "modules/fetch/ResponseInit.h" |
28 #include "platform/loader/fetch/FetchUtils.h" | 29 #include "platform/loader/fetch/FetchUtils.h" |
29 #include "platform/network/EncodedFormData.h" | 30 #include "platform/network/EncodedFormData.h" |
30 #include "platform/network/HTTPHeaderMap.h" | 31 #include "platform/network/HTTPHeaderMap.h" |
31 #include "platform/network/NetworkUtils.h" | 32 #include "platform/network/NetworkUtils.h" |
32 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" | 33 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" |
33 #include "wtf/RefPtr.h" | 34 #include "wtf/RefPtr.h" |
34 #include <memory> | |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 FetchResponseData* createFetchResponseDataFromWebResponse( | 40 FetchResponseData* createFetchResponseDataFromWebResponse( |
41 ScriptState* scriptState, | 41 ScriptState* scriptState, |
42 const WebServiceWorkerResponse& webResponse) { | 42 const WebServiceWorkerResponse& webResponse) { |
43 FetchResponseData* response = nullptr; | 43 FetchResponseData* response = nullptr; |
44 if (webResponse.status() > 0) | 44 if (webResponse.status() > 0) |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 V8HiddenValue::internalBodyBuffer(scriptState->isolate()), bodyBuffer); | 457 V8HiddenValue::internalBodyBuffer(scriptState->isolate()), bodyBuffer); |
458 } | 458 } |
459 | 459 |
460 DEFINE_TRACE(Response) { | 460 DEFINE_TRACE(Response) { |
461 Body::trace(visitor); | 461 Body::trace(visitor); |
462 visitor->trace(m_response); | 462 visitor->trace(m_response); |
463 visitor->trace(m_headers); | 463 visitor->trace(m_headers); |
464 } | 464 } |
465 | 465 |
466 } // namespace blink | 466 } // namespace blink |
OLD | NEW |