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 "public/platform/WebServiceWorkerRequest.h" | 6 #include "public/platform/WebServiceWorkerRequest.h" |
7 | 7 |
8 #include "platform/blob/BlobData.h" | 8 #include "platform/blob/BlobData.h" |
9 #include "platform/weborigin/KURL.h" | 9 #include "platform/weborigin/KURL.h" |
10 #include "public/platform/WebHTTPHeaderVisitor.h" | 10 #include "public/platform/WebHTTPHeaderVisitor.h" |
11 #include "public/platform/WebURLRequest.h" | 11 #include "public/platform/WebURLRequest.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class WebServiceWorkerRequestPrivate : public RefCounted<WebServiceWorkerRequest
Private> { | 15 class WebServiceWorkerRequestPrivate : public RefCounted<WebServiceWorkerRequest
Private> { |
16 public: | 16 public: |
17 WebServiceWorkerRequestPrivate() | 17 WebServiceWorkerRequestPrivate() |
18 : m_mode(WebURLRequest::FetchRequestModeNoCORS) | 18 : m_mode(WebURLRequest::FetchRequestModeNoCORS) |
19 , m_credentialsMode(WebURLRequest::FetchCredentialsModeOmit) | 19 , m_credentialsMode(WebURLRequest::FetchCredentialsModeOmit) |
20 , m_isReload(false) { } | 20 , m_requestContext(WebURLRequest::RequestContextUnspecified) |
| 21 , m_frameType(WebURLRequest::FrameTypeNone) |
| 22 , m_isReload(false) |
| 23 { |
| 24 } |
21 WebURL m_url; | 25 WebURL m_url; |
22 WebString m_method; | 26 WebString m_method; |
23 HTTPHeaderMap m_headers; | 27 HTTPHeaderMap m_headers; |
24 RefPtr<BlobDataHandle> blobDataHandle; | 28 RefPtr<BlobDataHandle> blobDataHandle; |
25 Referrer m_referrer; | 29 Referrer m_referrer; |
26 WebURLRequest::FetchRequestMode m_mode; | 30 WebURLRequest::FetchRequestMode m_mode; |
27 WebURLRequest::FetchCredentialsMode m_credentialsMode; | 31 WebURLRequest::FetchCredentialsMode m_credentialsMode; |
| 32 WebURLRequest::RequestContext m_requestContext; |
| 33 WebURLRequest::FrameType m_frameType; |
28 bool m_isReload; | 34 bool m_isReload; |
29 }; | 35 }; |
30 | 36 |
31 WebServiceWorkerRequest::WebServiceWorkerRequest() | 37 WebServiceWorkerRequest::WebServiceWorkerRequest() |
32 : m_private(adoptRef(new WebServiceWorkerRequestPrivate)) | 38 : m_private(adoptRef(new WebServiceWorkerRequestPrivate)) |
33 { | 39 { |
34 } | 40 } |
35 | 41 |
36 void WebServiceWorkerRequest::reset() | 42 void WebServiceWorkerRequest::reset() |
37 { | 43 { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void WebServiceWorkerRequest::setCredentialsMode(WebURLRequest::FetchCredentials
Mode credentialsMode) | 139 void WebServiceWorkerRequest::setCredentialsMode(WebURLRequest::FetchCredentials
Mode credentialsMode) |
134 { | 140 { |
135 m_private->m_credentialsMode = credentialsMode; | 141 m_private->m_credentialsMode = credentialsMode; |
136 } | 142 } |
137 | 143 |
138 WebURLRequest::FetchCredentialsMode WebServiceWorkerRequest::credentialsMode() c
onst | 144 WebURLRequest::FetchCredentialsMode WebServiceWorkerRequest::credentialsMode() c
onst |
139 { | 145 { |
140 return m_private->m_credentialsMode; | 146 return m_private->m_credentialsMode; |
141 } | 147 } |
142 | 148 |
| 149 void WebServiceWorkerRequest::setRequestContext(WebURLRequest::RequestContext re
questContext) |
| 150 { |
| 151 m_private->m_requestContext = requestContext; |
| 152 } |
| 153 |
| 154 WebURLRequest::RequestContext WebServiceWorkerRequest::requestContext() const |
| 155 { |
| 156 return m_private->m_requestContext; |
| 157 } |
| 158 |
| 159 void WebServiceWorkerRequest::setFrameType(WebURLRequest::FrameType frameType) |
| 160 { |
| 161 m_private->m_frameType = frameType; |
| 162 } |
| 163 |
| 164 WebURLRequest::FrameType WebServiceWorkerRequest::frameType() const |
| 165 { |
| 166 return m_private->m_frameType; |
| 167 } |
| 168 |
143 void WebServiceWorkerRequest::setIsReload(bool isReload) | 169 void WebServiceWorkerRequest::setIsReload(bool isReload) |
144 { | 170 { |
145 m_private->m_isReload = isReload; | 171 m_private->m_isReload = isReload; |
146 } | 172 } |
147 | 173 |
148 bool WebServiceWorkerRequest::isReload() const | 174 bool WebServiceWorkerRequest::isReload() const |
149 { | 175 { |
150 return m_private->m_isReload; | 176 return m_private->m_isReload; |
151 } | 177 } |
152 | 178 |
153 } // namespace blink | 179 } // namespace blink |
OLD | NEW |