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

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

Issue 461163002: Cleanup namespace usage in Source/core/modules/[mediasource/* to websockets/*] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/serviceworkers/Request.h ('k') | Source/modules/serviceworkers/ServiceWorker.h » ('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"
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/RefCounted.h" 15 #include "wtf/RefCounted.h"
16 #include "wtf/RefPtr.h" 16 #include "wtf/RefPtr.h"
17 #include "wtf/text/WTFString.h" 17 #include "wtf/text/WTFString.h"
18 18
19 namespace blink { class WebServiceWorkerResponse; }
20
21 namespace blink { 19 namespace blink {
22 20
23 class Blob; 21 class Blob;
24 class ExceptionState; 22 class ExceptionState;
25 class ResponseInit; 23 class ResponseInit;
24 class WebServiceWorkerResponse;
26 25
27 class Response FINAL : public RefCountedWillBeGarbageCollected<Response>, public ScriptWrappable { 26 class Response FINAL : public RefCountedWillBeGarbageCollected<Response>, public ScriptWrappable {
28 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Response); 27 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Response);
29 public: 28 public:
30 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const Dictionary&, Exc eptionState&); 29 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const Dictionary&, Exc eptionState&);
31 static PassRefPtrWillBeRawPtr<Response> create(const String&, const Dictiona ry&, ExceptionState&); 30 static PassRefPtrWillBeRawPtr<Response> create(const String&, const Dictiona ry&, ExceptionState&);
32 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const ResponseInit&, E xceptionState&); 31 static PassRefPtrWillBeRawPtr<Response> create(Blob*, const ResponseInit&, E xceptionState&);
33 32
34 static PassRefPtrWillBeRawPtr<Response> create(PassRefPtrWillBeRawPtr<FetchR esponseData>); 33 static PassRefPtrWillBeRawPtr<Response> create(PassRefPtrWillBeRawPtr<FetchR esponseData>);
35 34
36 String type() const; 35 String type() const;
37 String url() const; 36 String url() const;
38 unsigned short status() const; 37 unsigned short status() const;
39 String statusText() const; 38 String statusText() const;
40 PassRefPtrWillBeRawPtr<Headers> headers() const; 39 PassRefPtrWillBeRawPtr<Headers> headers() const;
41 40
42 PassRefPtrWillBeRawPtr<FetchBodyStream> body(ExecutionContext*); 41 PassRefPtrWillBeRawPtr<FetchBodyStream> body(ExecutionContext*);
43 42
44 void populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse&); 43 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&);
45 44
46 void trace(Visitor*); 45 void trace(Visitor*);
47 46
48 private: 47 private:
49 Response(); 48 Response();
50 explicit Response(PassRefPtrWillBeRawPtr<FetchResponseData>); 49 explicit Response(PassRefPtrWillBeRawPtr<FetchResponseData>);
51 50
52 RefPtrWillBeMember<FetchResponseData> m_response; 51 RefPtrWillBeMember<FetchResponseData> m_response;
53 RefPtrWillBeMember<Headers> m_headers; 52 RefPtrWillBeMember<Headers> m_headers;
54 RefPtrWillBeMember<FetchBodyStream> m_fetchBodyStream; 53 RefPtrWillBeMember<FetchBodyStream> m_fetchBodyStream;
55 }; 54 };
56 55
57 } // namespace blink 56 } // namespace blink
58 57
59 #endif // Response_h 58 #endif // Response_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Request.h ('k') | Source/modules/serviceworkers/ServiceWorker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698