| 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 "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/V8ArrayBuffer.h" | 10 #include "bindings/core/v8/V8ArrayBuffer.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 bool Response::hasBody() const | 398 bool Response::hasBody() const |
| 399 { | 399 { |
| 400 return m_response->internalBuffer(); | 400 return m_response->internalBuffer(); |
| 401 } | 401 } |
| 402 | 402 |
| 403 bool Response::bodyUsed() | 403 bool Response::bodyUsed() |
| 404 { | 404 { |
| 405 return internalBodyBuffer() && internalBodyBuffer()->isStreamDisturbed(); | 405 return internalBodyBuffer() && internalBodyBuffer()->isStreamDisturbed(); |
| 406 } | 406 } |
| 407 | 407 |
| 408 String Response::contentType() const |
| 409 { |
| 410 String result; |
| 411 m_response->headerList()->get(HTTPNames::Content_Type, result); |
| 412 return result; |
| 413 } |
| 414 |
| 408 String Response::mimeType() const | 415 String Response::mimeType() const |
| 409 { | 416 { |
| 410 return m_response->mimeType(); | 417 return m_response->mimeType(); |
| 411 } | 418 } |
| 412 | 419 |
| 413 String Response::internalMIMEType() const | 420 String Response::internalMIMEType() const |
| 414 { | 421 { |
| 415 return m_response->internalMIMEType(); | 422 return m_response->internalMIMEType(); |
| 416 } | 423 } |
| 417 | 424 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 438 } | 445 } |
| 439 | 446 |
| 440 DEFINE_TRACE(Response) | 447 DEFINE_TRACE(Response) |
| 441 { | 448 { |
| 442 Body::trace(visitor); | 449 Body::trace(visitor); |
| 443 visitor->trace(m_response); | 450 visitor->trace(m_response); |
| 444 visitor->trace(m_headers); | 451 visitor->trace(m_headers); |
| 445 } | 452 } |
| 446 | 453 |
| 447 } // namespace blink | 454 } // namespace blink |
| OLD | NEW |