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

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

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/serviceworkers/Body.h" 10 #include "modules/serviceworkers/Body.h"
11 #include "modules/serviceworkers/FetchResponseData.h" 11 #include "modules/serviceworkers/FetchResponseData.h"
12 #include "modules/serviceworkers/Headers.h" 12 #include "modules/serviceworkers/Headers.h"
13 #include "platform/blob/BlobData.h" 13 #include "platform/blob/BlobData.h"
14 #include "platform/heap/Handle.h" 14 #include "platform/heap/Handle.h"
15 #include "wtf/Forward.h"
16 15
17 namespace blink { 16 namespace blink {
18 17
19 class Blob; 18 class Blob;
19 class DOMArrayBuffer;
20 class DOMArrayBufferView;
20 class ExceptionState; 21 class ExceptionState;
21 class ResponseInit; 22 class ResponseInit;
22 class WebServiceWorkerResponse; 23 class WebServiceWorkerResponse;
23 24
24 class Response final : public Body { 25 class Response final : public Body {
25 DEFINE_WRAPPERTYPEINFO(); 26 DEFINE_WRAPPERTYPEINFO();
26 public: 27 public:
27 virtual ~Response() { } 28 virtual ~Response() { }
28 static Response* create(ExecutionContext*, Blob*, const Dictionary&, Excepti onState&); 29 static Response* create(ExecutionContext*, Blob*, const Dictionary&, Excepti onState&);
29 static Response* create(ExecutionContext*, const String&, const Dictionary&, ExceptionState&); 30 static Response* create(ExecutionContext*, const String&, const Dictionary&, ExceptionState&);
30 static Response* create(ExecutionContext*, const ArrayBuffer*, const Diction ary&, ExceptionState&); 31 static Response* create(ExecutionContext*, const DOMArrayBuffer*, const Dict ionary&, ExceptionState&);
31 static Response* create(ExecutionContext*, const ArrayBufferView*, const Dic tionary&, ExceptionState&); 32 static Response* create(ExecutionContext*, const DOMArrayBufferView*, const Dictionary&, ExceptionState&);
32 static Response* create(ExecutionContext*, Blob*, const ResponseInit&, Excep tionState&); 33 static Response* create(ExecutionContext*, Blob*, const ResponseInit&, Excep tionState&);
33 static Response* create(ExecutionContext*, FetchResponseData*); 34 static Response* create(ExecutionContext*, FetchResponseData*);
34 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&); 35 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&);
35 // The 'FetchResponseData' object is shared between responses, as it is 36 // The 'FetchResponseData' object is shared between responses, as it is
36 // immutable to the user after Response creation. Headers are copied. 37 // immutable to the user after Response creation. Headers are copied.
37 static Response* create(const Response&); 38 static Response* create(const Response&);
38 39
39 const FetchResponseData* response() const { return m_response; } 40 const FetchResponseData* response() const { return m_response; }
40 41
41 String type() const; 42 String type() const;
(...skipping 15 matching lines...) Expand all
57 58
58 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override; 59 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override;
59 60
60 const Member<FetchResponseData> m_response; 61 const Member<FetchResponseData> m_response;
61 const Member<Headers> m_headers; 62 const Member<Headers> m_headers;
62 }; 63 };
63 64
64 } // namespace blink 65 } // namespace blink
65 66
66 #endif // Response_h 67 #endif // Response_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/RequestInit.cpp ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698