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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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
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/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 String type() const; 53 String type() const;
54 String url() const; 54 String url() const;
55 unsigned short status() const; 55 unsigned short status() const;
56 bool ok() const; 56 bool ok() const;
57 String statusText() const; 57 String statusText() const;
58 Headers* headers() const; 58 Headers* headers() const;
59 59
60 // From Response.idl: 60 // From Response.idl:
61 Response* clone(ExceptionState&); 61 Response* clone(ExceptionState&);
62 62
63 // ActiveScriptWrappable
64 bool hasPendingActivity() const final;
65
63 // ActiveDOMObject 66 // ActiveDOMObject
64 bool hasPendingActivity() const override;
65 void stop() override; 67 void stop() override;
66 68
67 // Does not call response.setBlobDataHandle(). 69 // Does not call response.setBlobDataHandle().
68 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */); 70 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */);
69 71
70 bool hasBody() const; 72 bool hasBody() const;
71 BodyStreamBuffer* bodyBuffer() override { return m_response->buffer(); } 73 BodyStreamBuffer* bodyBuffer() override { return m_response->buffer(); }
72 const BodyStreamBuffer* bodyBuffer() const override { return m_response->buf fer(); } 74 const BodyStreamBuffer* bodyBuffer() const override { return m_response->buf fer(); }
73 BodyStreamBuffer* internalBodyBuffer() { return m_response->internalBuffer() ; } 75 BodyStreamBuffer* internalBodyBuffer() { return m_response->internalBuffer() ; }
74 const BodyStreamBuffer* internalBodyBuffer() const { return m_response->inte rnalBuffer(); } 76 const BodyStreamBuffer* internalBodyBuffer() const { return m_response->inte rnalBuffer(); }
75 bool bodyUsed() override; 77 bool bodyUsed() override;
76 78
77 String mimeType() const override; 79 String mimeType() const override;
78 String internalMIMEType() const; 80 String internalMIMEType() const;
79 81
80 DECLARE_VIRTUAL_TRACE(); 82 DECLARE_VIRTUAL_TRACE();
81 83
82 private: 84 private:
83 explicit Response(ExecutionContext*); 85 explicit Response(ExecutionContext*);
84 Response(ExecutionContext*, FetchResponseData*); 86 Response(ExecutionContext*, FetchResponseData*);
85 Response(ExecutionContext*, FetchResponseData*, Headers*); 87 Response(ExecutionContext*, FetchResponseData*, Headers*);
86 88
87 const Member<FetchResponseData> m_response; 89 const Member<FetchResponseData> m_response;
88 const Member<Headers> m_headers; 90 const Member<Headers> m_headers;
89 }; 91 };
90 92
91 } // namespace blink 93 } // namespace blink
92 94
93 #endif // Response_h 95 #endif // Response_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698