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

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

Issue 1171913003: **** [WIP] Blink-side: Implement FetchBlobDataConsumerHandle **** (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up. Created 5 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
« no previous file with comments | « Source/modules/fetch/Request.cpp ('k') | Source/modules/fetch/Response.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "bindings/modules/v8/UnionTypesModules.h" 10 #include "bindings/modules/v8/UnionTypesModules.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "modules/fetch/Body.h" 12 #include "modules/fetch/Body.h"
13 #include "modules/fetch/FetchResponseData.h" 13 #include "modules/fetch/FetchResponseData.h"
14 #include "modules/fetch/Headers.h" 14 #include "modules/fetch/Headers.h"
15 #include "platform/blob/BlobData.h" 15 #include "platform/blob/BlobData.h"
16 #include "platform/heap/Handle.h" 16 #include "platform/heap/Handle.h"
17 17
18 namespace blink { 18 namespace blink {
19 19
20 class Blob; 20 class Blob;
21 class BodyStreamBuffer; 21 class BodyStreamBuffer2;
22 class DOMArrayBuffer; 22 class DOMArrayBuffer;
23 class ExceptionState; 23 class ExceptionState;
24 class ResponseInit; 24 class ResponseInit;
25 class WebServiceWorkerResponse; 25 class WebServiceWorkerResponse;
26 26
27 typedef BlobOrArrayBufferOrArrayBufferViewOrFormDataOrUSVString BodyInit; 27 typedef BlobOrArrayBufferOrArrayBufferViewOrFormDataOrUSVString BodyInit;
28 28
29 class MODULES_EXPORT Response final : public Body { 29 class MODULES_EXPORT Response final : public Body {
30 DEFINE_WRAPPERTYPEINFO(); 30 DEFINE_WRAPPERTYPEINFO();
31 public: 31 public:
(...skipping 22 matching lines...) Expand all
54 String statusText() const; 54 String statusText() const;
55 Headers* headers() const; 55 Headers* headers() const;
56 56
57 // From Response.idl: 57 // From Response.idl:
58 Response* clone(ExceptionState&); 58 Response* clone(ExceptionState&);
59 59
60 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&); 60 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&);
61 61
62 bool hasBody() const; 62 bool hasBody() const;
63 63
64 PassRefPtr<BlobDataHandle> blobDataHandle() const override; 64 BodyStreamBuffer2* buffer() const override;
65 BodyStreamBuffer* buffer() const override;
66 String mimeType() const override; 65 String mimeType() const override;
67 66
68 PassRefPtr<BlobDataHandle> internalBlobDataHandle() const; 67 BodyStreamBuffer2* internalBuffer() const;
69 BodyStreamBuffer* internalBuffer() const;
70 String internalMIMEType() const; 68 String internalMIMEType() const;
71 69
72 DECLARE_VIRTUAL_TRACE(); 70 DECLARE_VIRTUAL_TRACE();
73 71
74 private: 72 private:
75 explicit Response(ExecutionContext*); 73 explicit Response(ExecutionContext*);
76 Response(ExecutionContext*, FetchResponseData*); 74 Response(ExecutionContext*, FetchResponseData*);
77 Response(ExecutionContext*, FetchResponseData*, Headers*); 75 Response(ExecutionContext*, FetchResponseData*, Headers*);
78 76
79 void refreshBody(); 77 void refreshBody();
80 78
81 const Member<FetchResponseData> m_response; 79 const Member<FetchResponseData> m_response;
82 const Member<Headers> m_headers; 80 const Member<Headers> m_headers;
83 }; 81 };
84 82
85 } // namespace blink 83 } // namespace blink
86 84
87 #endif // Response_h 85 #endif // Response_h
OLDNEW
« no previous file with comments | « Source/modules/fetch/Request.cpp ('k') | Source/modules/fetch/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698