Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: public/platform/WebServiceWorkerRequest.h

Issue 329853012: [ServiceWorker] Make Request class better conformance with the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated jochen's comment Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/WebReferrerPolicy.h"
10 #include "public/platform/WebString.h" 11 #include "public/platform/WebString.h"
11 #include "public/platform/WebURL.h" 12 #include "public/platform/WebURL.h"
12 13
13 #if INSIDE_BLINK 14 #if INSIDE_BLINK
15 #include "platform/network/HTTPHeaderMap.h"
16 #include "platform/weborigin/Referrer.h"
14 #include "wtf/Forward.h" 17 #include "wtf/Forward.h"
15 #include "wtf/HashMap.h"
16 #include "wtf/text/StringHash.h" 18 #include "wtf/text/StringHash.h"
19 #include <utility>
17 #endif 20 #endif
18 21
19 namespace blink { 22 namespace blink {
20 23
21 class WebServiceWorkerRequestPrivate; 24 class WebServiceWorkerRequestPrivate;
22 25
23 // Represents a request of a fetch operation. FetchEvent dispatched by the 26 // 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 27 // browser contains this. The plan is for the Cache and fetch() API to also use
25 // it. 28 // it.
26 class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest { 29 class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest {
(...skipping 10 matching lines...) Expand all
37 void assign(const WebServiceWorkerRequest&); 40 void assign(const WebServiceWorkerRequest&);
38 41
39 void setURL(const WebURL&); 42 void setURL(const WebURL&);
40 WebURL url() const; 43 WebURL url() const;
41 44
42 void setMethod(const WebString&); 45 void setMethod(const WebString&);
43 WebString method() const; 46 WebString method() const;
44 47
45 void setHeader(const WebString& key, const WebString& value); 48 void setHeader(const WebString& key, const WebString& value);
46 49
50 void setReferrer(const WebString&, WebReferrerPolicy);
51
47 void setIsReload(bool); 52 void setIsReload(bool);
48 bool isReload() const; 53 bool isReload() const;
49 54
50 #if INSIDE_BLINK 55 #if INSIDE_BLINK
51 const HashMap<String, String>& headers() const; 56 const WebCore::HTTPHeaderMap& headers() const;
57 const WebCore::Referrer& referrer() const;
52 #endif 58 #endif
53 59
54 private: 60 private:
55 WebPrivatePtr<WebServiceWorkerRequestPrivate> m_private; 61 WebPrivatePtr<WebServiceWorkerRequestPrivate> m_private;
56 }; 62 };
57 63
58 } // namespace blink 64 } // namespace blink
59 65
60 #endif // WebServiceWorkerRequest_h 66 #endif // WebServiceWorkerRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698