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

Side by Side Diff: Source/modules/serviceworkers/Response.h

Issue 304233017: ServiceWorker: Add layout tests for fetch event response (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 6 years, 6 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
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 Response_h 5 #ifndef Response_h
6 #define Response_h 6 #define Response_h
7 7
8 #include "bindings/v8/Dictionary.h" 8 #include "bindings/v8/Dictionary.h"
9 #include "bindings/v8/ScriptWrappable.h" 9 #include "bindings/v8/ScriptWrappable.h"
10 #include "modules/serviceworkers/HeaderMap.h" 10 #include "modules/serviceworkers/HeaderMap.h"
11 #include "platform/blob/BlobData.h" 11 #include "platform/blob/BlobData.h"
12 #include "wtf/RefCounted.h" 12 #include "wtf/RefCounted.h"
13 #include "wtf/RefPtr.h" 13 #include "wtf/RefPtr.h"
14 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
15 15
16 namespace blink { class WebServiceWorkerResponse; } 16 namespace blink { class WebServiceWorkerResponse; }
17 17
18 namespace WebCore { 18 namespace WebCore {
19 19
20 class Blob; 20 class Blob;
21 struct ResponseInit; 21 struct ResponseInit;
22 22
23 class Response FINAL : public ScriptWrappable, public RefCounted<Response> { 23 class Response FINAL : public ScriptWrappable, public RefCounted<Response> {
24 public: 24 public:
25 static PassRefPtr<Response> create(const Dictionary& responseInit);
26 static PassRefPtr<Response> create(Blob* body, const Dictionary& responseIni t); 25 static PassRefPtr<Response> create(Blob* body, const Dictionary& responseIni t);
27 ~Response() { }; 26 ~Response() { };
28 27
29 unsigned short status() const { return m_status; } 28 unsigned short status() const { return m_status; }
30 String statusText() const { return m_statusText; } 29 String statusText() const { return m_statusText; }
31 PassRefPtr<HeaderMap> headers() const; 30 PassRefPtr<HeaderMap> headers() const;
32 31
33 void populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse&); 32 void populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse&);
34 33
35 private: 34 private:
36 Response(PassRefPtr<BlobDataHandle>, const ResponseInit&); 35 Response(PassRefPtr<BlobDataHandle>, const ResponseInit&);
37 unsigned short m_status; 36 unsigned short m_status;
38 String m_statusText; 37 String m_statusText;
39 RefPtr<HeaderMap> m_headers; 38 RefPtr<HeaderMap> m_headers;
40 RefPtr<BlobDataHandle> m_blobDataHandle; 39 RefPtr<BlobDataHandle> m_blobDataHandle;
41 }; 40 };
42 41
43 } // namespace WebCore 42 } // namespace WebCore
44 43
45 #endif // Response_h 44 #endif // Response_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698