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

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

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. 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 | Annotate | Revision Log
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 FetchBodyStream_h 5 #ifndef FetchBodyStream_h
6 #define FetchBodyStream_h 6 #define FetchBodyStream_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "core/dom/ActiveDOMObject.h" 11 #include "core/dom/ActiveDOMObject.h"
12 #include "core/fileapi/FileReaderLoader.h" 12 #include "core/fileapi/FileReaderLoader.h"
13 #include "core/fileapi/FileReaderLoaderClient.h" 13 #include "core/fileapi/FileReaderLoaderClient.h"
14 #include "platform/blob/BlobData.h" 14 #include "platform/blob/BlobData.h"
15 #include "platform/heap/Handle.h" 15 #include "platform/heap/Handle.h"
16 #include "wtf/RefCounted.h" 16 #include "wtf/RefCounted.h"
17 #include "wtf/RefPtr.h" 17 #include "wtf/RefPtr.h"
18 18
19 namespace blink { 19 namespace blink {
20 20
21 class ScriptState; 21 class ScriptState;
22 22
23 class FetchBodyStream FINAL 23 class FetchBodyStream FINAL
24 : public RefCountedWillBeGarbageCollectedFinalized<FetchBodyStream> 24 : public RefCountedWillBeGarbageCollectedFinalized<FetchBodyStream>
25 , public ScriptWrappable 25 , public ScriptWrappable
26 , public ActiveDOMObject 26 , public ActiveDOMObject
27 , public FileReaderLoaderClient { 27 , public FileReaderLoaderClient {
28 DEFINE_WRAPPERTYPEINFO();
28 public: 29 public:
29 enum ResponseType { 30 enum ResponseType {
30 ResponseAsArrayBuffer, 31 ResponseAsArrayBuffer,
31 ResponseAsBlob, 32 ResponseAsBlob,
32 ResponseAsFormData, 33 ResponseAsFormData,
33 ResponseAsJSON, 34 ResponseAsJSON,
34 ResponseAsText 35 ResponseAsText
35 }; 36 };
36 37
37 static PassRefPtrWillBeRawPtr<FetchBodyStream> create(ExecutionContext*, Pas sRefPtr<BlobDataHandle>); 38 static PassRefPtrWillBeRawPtr<FetchBodyStream> create(ExecutionContext*, Pas sRefPtr<BlobDataHandle>);
(...skipping 24 matching lines...) Expand all
62 RefPtr<BlobDataHandle> m_blobDataHandle; 63 RefPtr<BlobDataHandle> m_blobDataHandle;
63 OwnPtr<FileReaderLoader> m_loader; 64 OwnPtr<FileReaderLoader> m_loader;
64 bool m_hasRead; 65 bool m_hasRead;
65 ResponseType m_responseType; 66 ResponseType m_responseType;
66 RefPtr<ScriptPromiseResolver> m_resolver; 67 RefPtr<ScriptPromiseResolver> m_resolver;
67 }; 68 };
68 69
69 } // namespace blink 70 } // namespace blink
70 71
71 #endif // FetchBodyStream_h 72 #endif // FetchBodyStream_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/CacheStorage.h ('k') | Source/modules/serviceworkers/FetchEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698