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 Request_h | 5 #ifndef Request_h |
6 #define Request_h | 6 #define Request_h |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "modules/serviceworkers/FetchBodyStream.h" |
10 #include "modules/serviceworkers/FetchRequestData.h" | 11 #include "modules/serviceworkers/FetchRequestData.h" |
11 #include "modules/serviceworkers/Headers.h" | 12 #include "modules/serviceworkers/Headers.h" |
12 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
13 #include "platform/weborigin/KURL.h" | 14 #include "platform/weborigin/KURL.h" |
14 #include "wtf/RefCounted.h" | 15 #include "wtf/RefCounted.h" |
15 #include "wtf/RefPtr.h" | 16 #include "wtf/RefPtr.h" |
16 #include "wtf/text/WTFString.h" | 17 #include "wtf/text/WTFString.h" |
17 | 18 |
18 namespace blink { | 19 namespace blink { |
19 | 20 |
(...skipping 13 matching lines...) Expand all Loading... |
33 | 34 |
34 static PassRefPtrWillBeRawPtr<Request> create(PassRefPtrWillBeRawPtr<FetchRe
questData>); | 35 static PassRefPtrWillBeRawPtr<Request> create(PassRefPtrWillBeRawPtr<FetchRe
questData>); |
35 | 36 |
36 static PassRefPtrWillBeRawPtr<Request> create(const WebServiceWorkerRequest&
); | 37 static PassRefPtrWillBeRawPtr<Request> create(const WebServiceWorkerRequest&
); |
37 | 38 |
38 PassRefPtrWillBeRawPtr<FetchRequestData> request() { return m_request; } | 39 PassRefPtrWillBeRawPtr<FetchRequestData> request() { return m_request; } |
39 | 40 |
40 String method() const; | 41 String method() const; |
41 String url() const; | 42 String url() const; |
42 PassRefPtrWillBeRawPtr<Headers> headers() const { return m_headers; } | 43 PassRefPtrWillBeRawPtr<Headers> headers() const { return m_headers; } |
43 // FIXME: Support body. | 44 PassRefPtrWillBeRawPtr<FetchBodyStream> body(ExecutionContext*); |
44 String referrer() const; | 45 String referrer() const; |
45 String mode() const; | 46 String mode() const; |
46 String credentials() const; | 47 String credentials() const; |
47 | 48 |
48 void trace(Visitor*); | 49 void trace(Visitor*); |
49 | 50 |
50 private: | 51 private: |
51 explicit Request(PassRefPtrWillBeRawPtr<FetchRequestData>); | 52 explicit Request(PassRefPtrWillBeRawPtr<FetchRequestData>); |
52 explicit Request(const WebServiceWorkerRequest&); | 53 explicit Request(const WebServiceWorkerRequest&); |
53 | 54 |
54 RefPtrWillBeMember<FetchRequestData> m_request; | 55 RefPtrWillBeMember<FetchRequestData> m_request; |
55 RefPtrWillBeMember<Headers> m_headers; | 56 RefPtrWillBeMember<Headers> m_headers; |
| 57 RefPtrWillBeMember<FetchBodyStream> m_fetchBodyStream; |
56 }; | 58 }; |
57 | 59 |
58 } // namespace blink | 60 } // namespace blink |
59 | 61 |
60 #endif // Request_h | 62 #endif // Request_h |
OLD | NEW |