| 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 Response_h | 5 #ifndef Response_h |
| 6 #define Response_h | 6 #define Response_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
| 9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 return response_->Buffer(); | 85 return response_->Buffer(); |
| 86 } | 86 } |
| 87 // Returns the BodyStreamBuffer of the internal response of |m_response| if | 87 // Returns the BodyStreamBuffer of the internal response of |m_response| if |
| 88 // any. Otherwise, returns one of |m_response|. | 88 // any. Otherwise, returns one of |m_response|. |
| 89 BodyStreamBuffer* InternalBodyBuffer() { return response_->InternalBuffer(); } | 89 BodyStreamBuffer* InternalBodyBuffer() { return response_->InternalBuffer(); } |
| 90 const BodyStreamBuffer* InternalBodyBuffer() const { | 90 const BodyStreamBuffer* InternalBodyBuffer() const { |
| 91 return response_->InternalBuffer(); | 91 return response_->InternalBuffer(); |
| 92 } | 92 } |
| 93 bool bodyUsed() override; | 93 bool bodyUsed() override; |
| 94 | 94 |
| 95 String ContentType() const override; |
| 95 String MimeType() const override; | 96 String MimeType() const override; |
| 96 String InternalMIMEType() const; | 97 String InternalMIMEType() const; |
| 97 | 98 |
| 98 const Vector<KURL>& InternalURLList() const; | 99 const Vector<KURL>& InternalURLList() const; |
| 99 | 100 |
| 100 DECLARE_VIRTUAL_TRACE(); | 101 DECLARE_VIRTUAL_TRACE(); |
| 101 | 102 |
| 102 private: | 103 private: |
| 103 explicit Response(ExecutionContext*); | 104 explicit Response(ExecutionContext*); |
| 104 Response(ExecutionContext*, FetchResponseData*); | 105 Response(ExecutionContext*, FetchResponseData*); |
| 105 Response(ExecutionContext*, FetchResponseData*, Headers*); | 106 Response(ExecutionContext*, FetchResponseData*, Headers*); |
| 106 | 107 |
| 107 void InstallBody(); | 108 void InstallBody(); |
| 108 void RefreshBody(ScriptState*); | 109 void RefreshBody(ScriptState*); |
| 109 | 110 |
| 110 const Member<FetchResponseData> response_; | 111 const Member<FetchResponseData> response_; |
| 111 const Member<Headers> headers_; | 112 const Member<Headers> headers_; |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 } // namespace blink | 115 } // namespace blink |
| 115 | 116 |
| 116 #endif // Response_h | 117 #endif // Response_h |
| OLD | NEW |