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

Side by Side Diff: Source/modules/fetch/FetchBlobDataConsumerHandle.h

Issue 1264453002: Split the constructor of ThreadableLoader into two methods (ctor and start()) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 FetchBlobDataConsumerHandle_h 5 #ifndef FetchBlobDataConsumerHandle_h
6 #define FetchBlobDataConsumerHandle_h 6 #define FetchBlobDataConsumerHandle_h
7 7
8 #include "core/fetch/ResourceLoaderOptions.h" 8 #include "core/fetch/ResourceLoaderOptions.h"
9 #include "core/loader/ThreadableLoader.h" 9 #include "core/loader/ThreadableLoader.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "modules/fetch/FetchDataConsumerHandle.h" 11 #include "modules/fetch/FetchDataConsumerHandle.h"
12 #include "platform/blob/BlobData.h" 12 #include "platform/blob/BlobData.h"
13 #include "wtf/PassOwnPtr.h" 13 #include "wtf/PassOwnPtr.h"
14 #include "wtf/PassRefPtr.h" 14 #include "wtf/PassRefPtr.h"
15 #include "wtf/RefPtr.h" 15 #include "wtf/RefPtr.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class ExecutionContext; 19 class ExecutionContext;
20 class MODULES_EXPORT FetchBlobDataConsumerHandle final : public FetchDataConsume rHandle { 20 class MODULES_EXPORT FetchBlobDataConsumerHandle final : public FetchDataConsume rHandle {
21 WTF_MAKE_NONCOPYABLE(FetchBlobDataConsumerHandle); 21 WTF_MAKE_NONCOPYABLE(FetchBlobDataConsumerHandle);
22 public: 22 public:
23 class MODULES_EXPORT LoaderFactory : public GarbageCollectedFinalized<Loader Factory> { 23 class MODULES_EXPORT LoaderFactory : public GarbageCollectedFinalized<Loader Factory> {
24 public: 24 public:
25 virtual PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadabl eLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Re sourceLoaderOptions&) = 0; 25 virtual PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadabl eLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&) = 0;
26 virtual ~LoaderFactory() { } 26 virtual ~LoaderFactory() { }
27 DEFINE_INLINE_VIRTUAL_TRACE() { } 27 DEFINE_INLINE_VIRTUAL_TRACE() { }
28 }; 28 };
29 29
30 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>); 30 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>);
31 31
32 // For testing. 32 // For testing.
33 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>, LoaderFactory*); 33 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>, LoaderFactory*);
34 34
35 ~FetchBlobDataConsumerHandle(); 35 ~FetchBlobDataConsumerHandle();
36 36
37 private: 37 private:
38 FetchBlobDataConsumerHandle(ExecutionContext*, PassRefPtr<BlobDataHandle>, L oaderFactory*); 38 FetchBlobDataConsumerHandle(ExecutionContext*, PassRefPtr<BlobDataHandle>, L oaderFactory*);
39 Reader* obtainReaderInternal(Client*) override; 39 Reader* obtainReaderInternal(Client*) override;
40 40
41 const char* debugName() const override { return "FetchBlobDataConsumerHandle "; } 41 const char* debugName() const override { return "FetchBlobDataConsumerHandle "; }
42 42
43 class ReaderContext; 43 class ReaderContext;
44 RefPtr<ReaderContext> m_readerContext; 44 RefPtr<ReaderContext> m_readerContext;
45 }; 45 };
46 46
47 } // namespace blink 47 } // namespace blink
48 48
49 #endif // FetchBlobDataConsumerHandle_h 49 #endif // FetchBlobDataConsumerHandle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698