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
3 // found in the LICENSE file.
5 #ifndef WebServiceWorkerRequest_h
6 #define WebServiceWorkerRequest_h
9 #include "public/platform/WebPrivatePtr.h"
10 #include "public/platform/WebString.h"
11 #include "public/platform/WebURL.h"
14 #include "wtf/Forward.h"
15 #include "wtf/HashMap.h"
16 #include "wtf/text/StringHash.h"
21 class WebServiceWorkerRequestPrivate;
23 // 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
26 class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest {
28 ~WebServiceWorkerRequest() { reset(); }
29 WebServiceWorkerRequest();
30 WebServiceWorkerRequest& operator=(const WebServiceWorkerRequest& other)
37 void assign(const WebServiceWorkerRequest&);
39 void setURL(const WebURL&);
42 void setMethod(const WebString&);
43 WebString method() const;
45 void setHeader(const WebString& key, const WebString& value);
48 const HashMap<String, String>& headers() const;
52 WebPrivatePtr<WebServiceWorkerRequestPrivate> m_private;
57 #endif // WebServiceWorkerRequest_h