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 "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Returns the BodyStreamBuffer of the internal response of |m_response| if | 85 // Returns the BodyStreamBuffer of the internal response of |m_response| if |
86 // any. Otherwise, returns one of |m_response|. | 86 // any. Otherwise, returns one of |m_response|. |
87 BodyStreamBuffer* internalBodyBuffer() { | 87 BodyStreamBuffer* internalBodyBuffer() { |
88 return m_response->internalBuffer(); | 88 return m_response->internalBuffer(); |
89 } | 89 } |
90 const BodyStreamBuffer* internalBodyBuffer() const { | 90 const BodyStreamBuffer* internalBodyBuffer() const { |
91 return m_response->internalBuffer(); | 91 return m_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 DECLARE_VIRTUAL_TRACE(); | 99 DECLARE_VIRTUAL_TRACE(); |
99 | 100 |
100 private: | 101 private: |
101 explicit Response(ExecutionContext*); | 102 explicit Response(ExecutionContext*); |
102 Response(ExecutionContext*, FetchResponseData*); | 103 Response(ExecutionContext*, FetchResponseData*); |
103 Response(ExecutionContext*, FetchResponseData*, Headers*); | 104 Response(ExecutionContext*, FetchResponseData*, Headers*); |
104 | 105 |
105 void installBody(); | 106 void installBody(); |
106 void refreshBody(ScriptState*); | 107 void refreshBody(ScriptState*); |
107 | 108 |
108 const Member<FetchResponseData> m_response; | 109 const Member<FetchResponseData> m_response; |
109 const Member<Headers> m_headers; | 110 const Member<Headers> m_headers; |
110 }; | 111 }; |
111 | 112 |
112 } // namespace blink | 113 } // namespace blink |
113 | 114 |
114 #endif // Response_h | 115 #endif // Response_h |
OLD | NEW |