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

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

Issue 519803002: Support embedded created Response objects in ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@2e-request
Patch Set: rebase to trunk, now just waiting on upstream CL Created 6 years, 3 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/modules.gypi ('k') | Source/modules/serviceworkers/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 "modules/serviceworkers/FetchBodyStream.h" 10 #include "modules/serviceworkers/FetchBodyStream.h"
(...skipping 12 matching lines...) Expand all
23 class ResponseInit; 23 class ResponseInit;
24 class WebServiceWorkerResponse; 24 class WebServiceWorkerResponse;
25 25
26 class Response FINAL : public RefCountedWillBeGarbageCollected<Response>, public ScriptWrappable { 26 class Response FINAL : public RefCountedWillBeGarbageCollected<Response>, public ScriptWrappable {
27 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Response); 27 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Response);
28 DEFINE_WRAPPERTYPEINFO(); 28 DEFINE_WRAPPERTYPEINFO();
29 public: 29 public:
30 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const Dictionary&, Exc eptionState&); 30 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const Dictionary&, Exc eptionState&);
31 static PassRefPtrWillBeRawPtr<Response> create(const String&, const Dictiona ry&, ExceptionState&); 31 static PassRefPtrWillBeRawPtr<Response> create(const String&, const Dictiona ry&, ExceptionState&);
32 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const ResponseInit&, E xceptionState&); 32 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const ResponseInit&, E xceptionState&);
33
34 static PassRefPtrWillBeRawPtr<Response> create(PassRefPtrWillBeRawPtr<FetchR esponseData>); 33 static PassRefPtrWillBeRawPtr<Response> create(PassRefPtrWillBeRawPtr<FetchR esponseData>);
34 static PassRefPtrWillBeRawPtr<Response> create(const WebServiceWorkerRespons e&);
35 35
36 String type() const; 36 String type() const;
37 String url() const; 37 String url() const;
38 unsigned short status() const; 38 unsigned short status() const;
39 String statusText() const; 39 String statusText() const;
40 PassRefPtrWillBeRawPtr<Headers> headers() const; 40 PassRefPtrWillBeRawPtr<Headers> headers() const;
41 41
42 PassRefPtrWillBeRawPtr<FetchBodyStream> body(ExecutionContext*); 42 PassRefPtrWillBeRawPtr<FetchBodyStream> body(ExecutionContext*);
43 43
44 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&); 44 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&);
45 45
46 void trace(Visitor*); 46 void trace(Visitor*);
47 47
48 private: 48 private:
49 Response(); 49 Response();
50 explicit Response(PassRefPtrWillBeRawPtr<FetchResponseData>); 50 explicit Response(PassRefPtrWillBeRawPtr<FetchResponseData>);
51 explicit Response(const WebServiceWorkerResponse&);
51 52
52 RefPtrWillBeMember<FetchResponseData> m_response; 53 RefPtrWillBeMember<FetchResponseData> m_response;
53 RefPtrWillBeMember<Headers> m_headers; 54 RefPtrWillBeMember<Headers> m_headers;
54 RefPtrWillBeMember<FetchBodyStream> m_fetchBodyStream; 55 RefPtrWillBeMember<FetchBodyStream> m_fetchBodyStream;
55 }; 56 };
56 57
57 } // namespace blink 58 } // namespace blink
58 59
59 #endif // Response_h 60 #endif // Response_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698