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

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: 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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698