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/weborigin/KURL.h" | 9 #include "platform/weborigin/KURL.h" |
10 #include "platform/weborigin/Referrer.h" | 10 #include "platform/weborigin/Referrer.h" |
11 #include "public/platform/WebURLRequest.h" | 11 #include "public/platform/WebURLRequest.h" |
12 #include "wtf/PassOwnPtr.h" | 12 #include "wtf/PassOwnPtr.h" |
13 #include "wtf/PassRefPtr.h" | 13 #include "wtf/PassRefPtr.h" |
14 #include "wtf/text/AtomicString.h" | 14 #include "wtf/text/AtomicString.h" |
15 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class BlobDataHandle; | 19 class BlobDataHandle; |
20 class ExecutionContext; | 20 class ExecutionContext; |
21 class FetchHeaderList; | 21 class FetchHeaderList; |
22 class SecurityOrigin; | 22 class SecurityOrigin; |
23 class WebServiceWorkerRequest; | 23 class WebServiceWorkerRequest; |
24 | 24 |
25 class FetchRequestData final : public GarbageCollectedFinalized<FetchRequestData
> { | 25 class FetchRequestData final : public GarbageCollectedFinalized<FetchRequestData
> { |
26 WTF_MAKE_NONCOPYABLE(FetchRequestData); | 26 WTF_MAKE_NONCOPYABLE(FetchRequestData); |
27 public: | 27 public: |
28 enum Context { ChildContext, ConnectContext, DownloadContext, FontContext, F
ormContext, ImageContext, ManifestContext, MediaContext, NavigateContext, Object
Context, PingContext, PopupContext, PrefetchContext, ScriptContext, ServiceWorke
rContext, SharedWorkerContext, StyleContext, WorkerContext, NullContext }; | |
29 enum Tainting { BasicTainting, CORSTainting, OpaqueTainting }; | 28 enum Tainting { BasicTainting, CORSTainting, OpaqueTainting }; |
30 | 29 |
31 class Referrer final { | 30 class Referrer final { |
32 public: | 31 public: |
33 Referrer() : m_type(ClientReferrer) { } | 32 Referrer() : m_type(ClientReferrer) { } |
34 bool isNone() const { return m_type == NoneReferrer; } | 33 bool isNone() const { return m_type == NoneReferrer; } |
35 bool isClient() const { return m_type == ClientReferrer; } | 34 bool isClient() const { return m_type == ClientReferrer; } |
36 bool isURL() const { return m_type == URLReferrer; } | 35 bool isURL() const { return m_type == URLReferrer; } |
37 void setNone() | 36 void setNone() |
38 { | 37 { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 FetchRequestData(); | 85 FetchRequestData(); |
87 | 86 |
88 static FetchRequestData* create(); | 87 static FetchRequestData* create(); |
89 | 88 |
90 AtomicString m_method; | 89 AtomicString m_method; |
91 KURL m_url; | 90 KURL m_url; |
92 Member<FetchHeaderList> m_headerList; | 91 Member<FetchHeaderList> m_headerList; |
93 RefPtr<BlobDataHandle> m_blobDataHandle; | 92 RefPtr<BlobDataHandle> m_blobDataHandle; |
94 bool m_unsafeRequestFlag; | 93 bool m_unsafeRequestFlag; |
95 // FIXME: Support m_skipServiceWorkerFlag; | 94 // FIXME: Support m_skipServiceWorkerFlag; |
96 Context m_context; | 95 WebURLRequest::RequestContext m_context; |
97 RefPtr<SecurityOrigin> m_origin; | 96 RefPtr<SecurityOrigin> m_origin; |
98 // FIXME: Support m_forceOriginHeaderFlag; | 97 // FIXME: Support m_forceOriginHeaderFlag; |
99 bool m_sameOriginDataURLFlag; | 98 bool m_sameOriginDataURLFlag; |
100 Referrer m_referrer; | 99 Referrer m_referrer; |
101 // FIXME: Support m_authenticationFlag; | 100 // FIXME: Support m_authenticationFlag; |
102 // FIXME: Support m_synchronousFlag; | 101 // FIXME: Support m_synchronousFlag; |
103 WebURLRequest::FetchRequestMode m_mode; | 102 WebURLRequest::FetchRequestMode m_mode; |
104 WebURLRequest::FetchCredentialsMode m_credentials; | 103 WebURLRequest::FetchCredentialsMode m_credentials; |
105 // FIXME: Support m_useURLCredentialsFlag; | 104 // FIXME: Support m_useURLCredentialsFlag; |
106 // FIXME: Support m_manualRedirectFlag; | 105 // FIXME: Support m_manualRedirectFlag; |
107 // FIXME: Support m_redirectCount; | 106 // FIXME: Support m_redirectCount; |
108 Tainting m_responseTainting; | 107 Tainting m_responseTainting; |
109 }; | 108 }; |
110 | 109 |
111 } // namespace blink | 110 } // namespace blink |
112 | 111 |
113 #endif // FetchRequestData_h | 112 #endif // FetchRequestData_h |
OLD | NEW |