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

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

Issue 1455693003: Add comment to BodyStreamBuffer accessors for Response class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 5 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 | « third_party/WebKit/Source/modules/fetch/FetchResponseData.h ('k') | no next file » | 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/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 Response* clone(ScriptState*, ExceptionState&); 60 Response* clone(ScriptState*, ExceptionState&);
61 61
62 // ActiveScriptWrappable 62 // ActiveScriptWrappable
63 bool hasPendingActivity() const final; 63 bool hasPendingActivity() const final;
64 64
65 // Does not call response.setBlobDataHandle(). 65 // Does not call response.setBlobDataHandle().
66 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */); 66 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response */);
67 67
68 bool hasBody() const; 68 bool hasBody() const;
69 BodyStreamBuffer* bodyBuffer() override { return m_response->buffer(); } 69 BodyStreamBuffer* bodyBuffer() override { return m_response->buffer(); }
70 // Returns the BodyStreamBuffer of |m_response|. This method doesn't check
71 // the internal response of |m_response| even if |m_response| has it.
70 const BodyStreamBuffer* bodyBuffer() const override { return m_response->buf fer(); } 72 const BodyStreamBuffer* bodyBuffer() const override { return m_response->buf fer(); }
73 // Returns the BodyStreamBuffer of the internal response of |m_response| if
74 // any. Otherwise, returns one of |m_response|.
71 BodyStreamBuffer* internalBodyBuffer() { return m_response->internalBuffer() ; } 75 BodyStreamBuffer* internalBodyBuffer() { return m_response->internalBuffer() ; }
72 const BodyStreamBuffer* internalBodyBuffer() const { return m_response->inte rnalBuffer(); } 76 const BodyStreamBuffer* internalBodyBuffer() const { return m_response->inte rnalBuffer(); }
73 bool bodyUsed() override; 77 bool bodyUsed() override;
74 78
75 String mimeType() const override; 79 String mimeType() const override;
76 String internalMIMEType() const; 80 String internalMIMEType() const;
77 81
78 DECLARE_VIRTUAL_TRACE(); 82 DECLARE_VIRTUAL_TRACE();
79 83
80 private: 84 private:
81 explicit Response(ExecutionContext*); 85 explicit Response(ExecutionContext*);
82 Response(ExecutionContext*, FetchResponseData*); 86 Response(ExecutionContext*, FetchResponseData*);
83 Response(ExecutionContext*, FetchResponseData*, Headers*); 87 Response(ExecutionContext*, FetchResponseData*, Headers*);
84 88
85 void installBody(); 89 void installBody();
86 void refreshBody(ScriptState*); 90 void refreshBody(ScriptState*);
87 91
88 const Member<FetchResponseData> m_response; 92 const Member<FetchResponseData> m_response;
89 const Member<Headers> m_headers; 93 const Member<Headers> m_headers;
90 }; 94 };
91 95
92 } // namespace blink 96 } // namespace blink
93 97
94 #endif // Response_h 98 #endif // Response_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchResponseData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698