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 WebServiceWorkerResponse_h | 5 #ifndef WebServiceWorkerResponse_h |
6 #define WebServiceWorkerResponse_h | 6 #define WebServiceWorkerResponse_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/WebServiceWorkerResponseType.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 #include "public/platform/WebVector.h" | 13 #include "public/platform/WebVector.h" |
13 | 14 |
14 #if INSIDE_BLINK | 15 #if INSIDE_BLINK |
15 #include "wtf/Forward.h" | 16 #include "wtf/Forward.h" |
16 #include "wtf/HashMap.h" | 17 #include "wtf/HashMap.h" |
17 #include "wtf/text/StringHash.h" | 18 #include "wtf/text/StringHash.h" |
18 #endif | 19 #endif |
19 | 20 |
(...skipping 23 matching lines...) Expand all Loading... |
43 | 44 |
44 void setURL(const WebURL&); | 45 void setURL(const WebURL&); |
45 WebURL url() const; | 46 WebURL url() const; |
46 | 47 |
47 void setStatus(unsigned short); | 48 void setStatus(unsigned short); |
48 unsigned short status() const; | 49 unsigned short status() const; |
49 | 50 |
50 void setStatusText(const WebString&); | 51 void setStatusText(const WebString&); |
51 WebString statusText() const; | 52 WebString statusText() const; |
52 | 53 |
| 54 void setResponseType(WebServiceWorkerResponseType); |
| 55 WebServiceWorkerResponseType responseType() const; |
| 56 |
53 void setHeader(const WebString& key, const WebString& value); | 57 void setHeader(const WebString& key, const WebString& value); |
54 | 58 |
55 // If the key already exists, appends the value to the same key (comma | 59 // If the key already exists, appends the value to the same key (comma |
56 // delimited) else creates a new entry. | 60 // delimited) else creates a new entry. |
57 void appendHeader(const WebString& key, const WebString& value); | 61 void appendHeader(const WebString& key, const WebString& value); |
58 | 62 |
59 WebVector<WebString> getHeaderKeys() const; | 63 WebVector<WebString> getHeaderKeys() const; |
60 WebString getHeader(const WebString& key) const; | 64 WebString getHeader(const WebString& key) const; |
61 void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; | 65 void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; |
62 | 66 |
63 WebString blobUUID() const; | 67 WebString blobUUID() const; |
64 | 68 |
65 #if INSIDE_BLINK | 69 #if INSIDE_BLINK |
66 const HTTPHeaderMap& headers() const; | 70 const HTTPHeaderMap& headers() const; |
67 | 71 |
68 void setBlobDataHandle(PassRefPtr<BlobDataHandle>); | 72 void setBlobDataHandle(PassRefPtr<BlobDataHandle>); |
69 PassRefPtr<BlobDataHandle> blobDataHandle() const; | 73 PassRefPtr<BlobDataHandle> blobDataHandle() const; |
70 #endif | 74 #endif |
71 | 75 |
72 private: | 76 private: |
73 WebPrivatePtr<WebServiceWorkerResponsePrivate> m_private; | 77 WebPrivatePtr<WebServiceWorkerResponsePrivate> m_private; |
74 }; | 78 }; |
75 | 79 |
76 } // namespace blink | 80 } // namespace blink |
77 | 81 |
78 #endif // WebServiceWorkerResponse_h | 82 #endif // WebServiceWorkerResponse_h |
OLD | NEW |