| 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 #ifndef FetchRequestData_h | 5 #ifndef FetchRequestData_h |
| 6 #define FetchRequestData_h | 6 #define FetchRequestData_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "platform/network/EncodedFormData.h" | 9 #include "platform/network/EncodedFormData.h" |
| 10 #include "platform/weborigin/KURL.h" | 10 #include "platform/weborigin/KURL.h" |
| 11 #include "platform/weborigin/Referrer.h" | 11 #include "platform/weborigin/Referrer.h" |
| 12 #include "platform/weborigin/ReferrerPolicy.h" | 12 #include "platform/weborigin/ReferrerPolicy.h" |
| 13 #include "public/platform/WebURLRequest.h" | 13 #include "public/platform/WebURLRequest.h" |
| 14 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h" | 14 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h" |
| 15 #include "wtf/PassOwnPtr.h" | 15 #include "wtf/PassOwnPtr.h" |
| 16 #include "wtf/PassRefPtr.h" | 16 #include "wtf/PassRefPtr.h" |
| 17 #include "wtf/text/AtomicString.h" | 17 #include "wtf/text/AtomicString.h" |
| 18 #include "wtf/text/WTFString.h" | 18 #include "wtf/text/WTFString.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 class BodyStreamBuffer; | 22 class BodyStreamBuffer; |
| 23 class ExecutionContext; | 23 class ExecutionContext; |
| 24 class FetchHeaderList; | 24 class FetchHeaderList; |
| 25 class PasswordCredential; | 25 class PasswordCredential; |
| 26 class SecurityOrigin; | 26 class SecurityOrigin; |
| 27 class ScriptState; | |
| 28 class WebServiceWorkerRequest; | 27 class WebServiceWorkerRequest; |
| 29 | 28 |
| 30 class FetchRequestData final : public GarbageCollectedFinalized<FetchRequestData
> { | 29 class FetchRequestData final : public GarbageCollectedFinalized<FetchRequestData
> { |
| 31 WTF_MAKE_NONCOPYABLE(FetchRequestData); | 30 WTF_MAKE_NONCOPYABLE(FetchRequestData); |
| 32 public: | 31 public: |
| 33 enum Tainting { BasicTainting, CORSTainting, OpaqueTainting }; | 32 enum Tainting { BasicTainting, CORSTainting, OpaqueTainting }; |
| 34 | 33 |
| 35 static FetchRequestData* create(); | 34 static FetchRequestData* create(); |
| 36 static FetchRequestData* create(ScriptState*, const WebServiceWorkerRequest&
); | 35 static FetchRequestData* create(ExecutionContext*, const WebServiceWorkerReq
uest&); |
| 37 // Call Request::refreshBody() after calling clone() or pass(). | 36 // Call Request::refreshBody() after calling clone() or pass(). |
| 38 FetchRequestData* clone(ScriptState*); | 37 FetchRequestData* clone(ExecutionContext*); |
| 39 FetchRequestData* pass(ScriptState*); | 38 FetchRequestData* pass(ExecutionContext*); |
| 40 ~FetchRequestData(); | 39 ~FetchRequestData(); |
| 41 | 40 |
| 42 void setMethod(AtomicString method) { m_method = method; } | 41 void setMethod(AtomicString method) { m_method = method; } |
| 43 const AtomicString& method() const { return m_method; } | 42 const AtomicString& method() const { return m_method; } |
| 44 void setURL(const KURL& url) { m_url = url; } | 43 void setURL(const KURL& url) { m_url = url; } |
| 45 const KURL& url() const { return m_url; } | 44 const KURL& url() const { return m_url; } |
| 46 bool unsafeRequestFlag() const { return m_unsafeRequestFlag; } | 45 bool unsafeRequestFlag() const { return m_unsafeRequestFlag; } |
| 47 void setUnsafeRequestFlag(bool flag) { m_unsafeRequestFlag = flag; } | 46 void setUnsafeRequestFlag(bool flag) { m_unsafeRequestFlag = flag; } |
| 48 WebURLRequest::RequestContext context() const { return m_context; } | 47 WebURLRequest::RequestContext context() const { return m_context; } |
| 49 void setContext(WebURLRequest::RequestContext context) { m_context = context
; } | 48 void setContext(WebURLRequest::RequestContext context) { m_context = context
; } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 Tainting m_responseTainting; | 110 Tainting m_responseTainting; |
| 112 Member<BodyStreamBuffer> m_buffer; | 111 Member<BodyStreamBuffer> m_buffer; |
| 113 String m_mimeType; | 112 String m_mimeType; |
| 114 String m_integrity; | 113 String m_integrity; |
| 115 RefPtr<EncodedFormData> m_attachedCredential; | 114 RefPtr<EncodedFormData> m_attachedCredential; |
| 116 }; | 115 }; |
| 117 | 116 |
| 118 } // namespace blink | 117 } // namespace blink |
| 119 | 118 |
| 120 #endif // FetchRequestData_h | 119 #endif // FetchRequestData_h |
| OLD | NEW |