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

Side by Side Diff: public/web/WebServiceWorkerFetchResponse.h

Issue 180843003: Start to implement FetchEvent for ServiceWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
(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
OLDNEW
« Source/modules/serviceworkers/Response.idl ('K') | « public/web/WebServiceWorkerContextProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698