| 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/WebString.h" | 10 #include "public/platform/WebString.h" |
| 11 #include "public/platform/WebURL.h" |
| 11 #include "public/platform/WebVector.h" | 12 #include "public/platform/WebVector.h" |
| 12 | 13 |
| 13 #if INSIDE_BLINK | 14 #if INSIDE_BLINK |
| 14 #include "wtf/Forward.h" | 15 #include "wtf/Forward.h" |
| 15 #include "wtf/HashMap.h" | 16 #include "wtf/HashMap.h" |
| 16 #include "wtf/text/StringHash.h" | 17 #include "wtf/text/StringHash.h" |
| 17 | 18 |
| 18 namespace WebCore { | 19 namespace WebCore { |
| 19 class BlobDataHandle; | 20 class BlobDataHandle; |
| 20 } | 21 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 WebServiceWorkerResponse(); | 34 WebServiceWorkerResponse(); |
| 34 WebServiceWorkerResponse& operator=(const WebServiceWorkerResponse& other) | 35 WebServiceWorkerResponse& operator=(const WebServiceWorkerResponse& other) |
| 35 { | 36 { |
| 36 assign(other); | 37 assign(other); |
| 37 return *this; | 38 return *this; |
| 38 } | 39 } |
| 39 | 40 |
| 40 void reset(); | 41 void reset(); |
| 41 void assign(const WebServiceWorkerResponse&); | 42 void assign(const WebServiceWorkerResponse&); |
| 42 | 43 |
| 44 void setURL(const WebURL&); |
| 45 WebURL url() const; |
| 46 |
| 43 void setStatus(unsigned short); | 47 void setStatus(unsigned short); |
| 44 unsigned short status() const; | 48 unsigned short status() const; |
| 45 | 49 |
| 46 void setStatusText(const WebString&); | 50 void setStatusText(const WebString&); |
| 47 WebString statusText() const; | 51 WebString statusText() const; |
| 48 | 52 |
| 49 void setHeader(const WebString& key, const WebString& value); | 53 void setHeader(const WebString& key, const WebString& value); |
| 50 WebVector<WebString> getHeaderKeys() const; | 54 WebVector<WebString> getHeaderKeys() const; |
| 51 WebString getHeader(const WebString& key) const; | 55 WebString getHeader(const WebString& key) const; |
| 52 | 56 |
| 53 WebString blobUUID() const; | 57 WebString blobUUID() const; |
| 54 | 58 |
| 55 #if INSIDE_BLINK | 59 #if INSIDE_BLINK |
| 56 void setHeaders(const HashMap<String, String>&); | 60 void setHeaders(const HashMap<String, String>&); |
| 57 const HashMap<String, String>& headers() const; | 61 const HashMap<String, String>& headers() const; |
| 58 | 62 |
| 59 void setBlobDataHandle(PassRefPtr<WebCore::BlobDataHandle>); | 63 void setBlobDataHandle(PassRefPtr<WebCore::BlobDataHandle>); |
| 60 PassRefPtr<WebCore::BlobDataHandle> blobDataHandle() const; | 64 PassRefPtr<WebCore::BlobDataHandle> blobDataHandle() const; |
| 61 #endif | 65 #endif |
| 62 | 66 |
| 63 private: | 67 private: |
| 64 WebPrivatePtr<WebServiceWorkerResponsePrivate> m_private; | 68 WebPrivatePtr<WebServiceWorkerResponsePrivate> m_private; |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 } // namespace blink | 71 } // namespace blink |
| 68 | 72 |
| 69 #endif // WebServiceWorkerResponse_h | 73 #endif // WebServiceWorkerResponse_h |
| OLD | NEW |