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 WebServiceWorkerRequest_h | 5 #ifndef WebServiceWorkerRequest_h |
6 #define WebServiceWorkerRequest_h | 6 #define WebServiceWorkerRequest_h |
7 | 7 |
8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
9 #include "public/platform/WebPrivatePtr.h" | 9 #include "public/platform/WebPrivatePtr.h" |
10 #include "public/platform/WebString.h" | 10 #include "public/platform/WebString.h" |
11 #include "public/platform/WebURL.h" | 11 #include "public/platform/WebURL.h" |
12 | 12 |
13 #if INSIDE_BLINK | 13 #if INSIDE_BLINK |
14 #include "wtf/Forward.h" | 14 #include "wtf/Forward.h" |
15 #include "wtf/HashMap.h" | 15 #include "wtf/Vector.h" |
16 #include "wtf/text/StringHash.h" | 16 #include "wtf/text/StringHash.h" |
17 #include <utility> | |
17 #endif | 18 #endif |
18 | 19 |
19 namespace blink { | 20 namespace blink { |
20 | 21 |
21 class WebServiceWorkerRequestPrivate; | 22 class WebServiceWorkerRequestPrivate; |
22 | 23 |
23 // Represents a request of a fetch operation. FetchEvent dispatched by the | 24 // Represents a request of a fetch operation. FetchEvent dispatched by the |
24 // browser contains this. The plan is for the Cache and fetch() API to also use | 25 // browser contains this. The plan is for the Cache and fetch() API to also use |
25 // it. | 26 // it. |
26 class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest { | 27 class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest { |
(...skipping 10 matching lines...) Expand all Loading... | |
37 void assign(const WebServiceWorkerRequest&); | 38 void assign(const WebServiceWorkerRequest&); |
38 | 39 |
39 void setURL(const WebURL&); | 40 void setURL(const WebURL&); |
40 WebURL url() const; | 41 WebURL url() const; |
41 | 42 |
42 void setMethod(const WebString&); | 43 void setMethod(const WebString&); |
43 WebString method() const; | 44 WebString method() const; |
44 | 45 |
45 void setHeader(const WebString& key, const WebString& value); | 46 void setHeader(const WebString& key, const WebString& value); |
46 | 47 |
48 void setReferrer(const WebString&); | |
jochen (gone - plz use gerrit)
2014/07/07 07:15:33
referrer must go together with a referrer policy
horo
2014/07/07 09:31:38
Done.
| |
49 WebString referrer() const; | |
50 | |
47 void setIsReload(bool); | 51 void setIsReload(bool); |
48 bool isReload() const; | 52 bool isReload() const; |
49 | 53 |
50 #if INSIDE_BLINK | 54 #if INSIDE_BLINK |
51 const HashMap<String, String>& headers() const; | 55 typedef std::pair<String, String> Header; |
56 const Vector<OwnPtr<Header> >& headerList() const; | |
jochen (gone - plz use gerrit)
2014/07/07 07:15:33
why not a HTTPHeaderMap?
horo
2014/07/07 09:31:38
Done.
| |
52 #endif | 57 #endif |
53 | 58 |
54 private: | 59 private: |
55 WebPrivatePtr<WebServiceWorkerRequestPrivate> m_private; | 60 WebPrivatePtr<WebServiceWorkerRequestPrivate> m_private; |
56 }; | 61 }; |
57 | 62 |
58 } // namespace blink | 63 } // namespace blink |
59 | 64 |
60 #endif // WebServiceWorkerRequest_h | 65 #endif // WebServiceWorkerRequest_h |
OLD | NEW |