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 "Request.h" | 6 #include "Request.h" |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
10 #include "core/fetch/FetchUtils.h" | 10 #include "core/fetch/FetchUtils.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 webRequest.setReferrer(m_request->referrer().referrer().referrer, static_cas
t<WebReferrerPolicy>(m_request->referrer().referrer().referrerPolicy)); | 312 webRequest.setReferrer(m_request->referrer().referrer().referrer, static_cas
t<WebReferrerPolicy>(m_request->referrer().referrer().referrerPolicy)); |
313 // FIXME: How can we set isReload properly? What is the correct place to loa
d it in to the Request object? We should investigate the right way | 313 // FIXME: How can we set isReload properly? What is the correct place to loa
d it in to the Request object? We should investigate the right way |
314 // to plumb this information in to here. | 314 // to plumb this information in to here. |
315 } | 315 } |
316 | 316 |
317 void Request::setBodyBlobHandle(PassRefPtr<BlobDataHandle> blobDataHandle) | 317 void Request::setBodyBlobHandle(PassRefPtr<BlobDataHandle> blobDataHandle) |
318 { | 318 { |
319 m_request->setBlobDataHandle(blobDataHandle); | 319 m_request->setBlobDataHandle(blobDataHandle); |
320 } | 320 } |
321 | 321 |
| 322 bool Request::hasBody() const |
| 323 { |
| 324 return m_request->blobDataHandle(); |
| 325 } |
| 326 |
322 void Request::clearHeaderList() | 327 void Request::clearHeaderList() |
323 { | 328 { |
324 m_request->headerList()->clearList(); | 329 m_request->headerList()->clearList(); |
325 } | 330 } |
326 | 331 |
327 PassRefPtr<BlobDataHandle> Request::blobDataHandle() | 332 PassRefPtr<BlobDataHandle> Request::blobDataHandle() |
328 { | 333 { |
329 return m_request->blobDataHandle(); | 334 return m_request->blobDataHandle(); |
330 } | 335 } |
331 | 336 |
332 void Request::trace(Visitor* visitor) | 337 void Request::trace(Visitor* visitor) |
333 { | 338 { |
334 Body::trace(visitor); | 339 Body::trace(visitor); |
335 visitor->trace(m_request); | 340 visitor->trace(m_request); |
336 visitor->trace(m_headers); | 341 visitor->trace(m_headers); |
337 } | 342 } |
338 | 343 |
339 } // namespace blink | 344 } // namespace blink |
OLD | NEW |