Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef WebServiceWorkerFetchResponse_h | |
| 6 #define WebServiceWorkerFetchResponse_h | |
| 7 | |
| 8 #include "public/platform/WebPrivatePtr.h" | |
| 9 #include "public/platform/WebString.h" | |
| 10 #include "public/platform/WebVector.h" | |
| 11 | |
| 12 #if BLINK_IMPLEMENTATION | |
| 13 namespace WTF { template <typename T> class PassRefPtr; } | |
| 14 #endif | |
| 15 | |
| 16 namespace WebCore { class Response; } | |
| 17 | |
| 18 namespace blink { | |
| 19 | |
| 20 // Represents a response to a fetch event. | |
| 21 class WebServiceWorkerFetchResponse { | |
|
kinuko
2014/02/26 05:42:49
It's a bit questionable if we want to share this i
falken
2014/02/27 06:45:09
As you once suggested, let me kick the web/ stuff
| |
| 22 public: | |
| 23 enum Type { FallbackToNative, Response }; | |
| 24 | |
| 25 ~WebServiceWorkerFetchResponse(); | |
| 26 BLINK_EXPORT Type type() const { return m_type; } | |
| 27 BLINK_EXPORT unsigned short statusCode() const; | |
| 28 BLINK_EXPORT WebString statusText() const; | |
| 29 BLINK_EXPORT WebString method() const; | |
| 30 | |
| 31 // FIXME: Eventually this should have additional methods like: | |
| 32 // BLINK_EXPORT WebVector<WebString> headerKeys(); | |
| 33 // BLINK_EXPORT WebString header(WebString key); | |
| 34 // BLINK_EXPORT WebBlob toBlob(); | |
| 35 | |
| 36 #if BLINK_IMPLEMENTATION | |
| 37 WebServiceWorkerFetchResponse(Type); | |
| 38 WebServiceWorkerFetchResponse(const WTF::PassRefPtr<WebCore::Response>&); | |
| 39 #endif | |
| 40 | |
| 41 private: | |
| 42 Type m_type; | |
| 43 | |
| 44 #if BLINK_IMPLEMENTATION | |
| 45 WebPrivatePtr<WebCore::Response> m_private; | |
| 46 #endif | |
| 47 }; | |
| 48 | |
| 49 } // namespace blink | |
| 50 | |
| 51 #endif // WebServiceWorkerFetchResponse_h | |
| OLD | NEW |