Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef FetchBlobDataConsumerHandle_h | |
| 6 #define FetchBlobDataConsumerHandle_h | |
| 7 | |
| 8 #include "core/fetch/ResourceLoaderOptions.h" | |
| 9 #include "core/loader/ThreadableLoader.h" | |
| 10 #include "modules/fetch/FetchDataConsumerHandle.h" | |
| 11 #include "platform/blob/BlobData.h" | |
| 12 #include "wtf/PassOwnPtr.h" | |
| 13 #include "wtf/PassRefPtr.h" | |
| 14 #include "wtf/RefPtr.h" | |
| 15 | |
| 16 namespace blink { | |
| 17 | |
| 18 class ExecutionContext; | |
| 19 class FetchBlobDataConsumerHandle final : public FetchDataConsumerHandle { | |
| 20 public: | |
| 21 class LoaderFactory : public GarbageCollectedFinalized<LoaderFactory> { | |
| 22 public: | |
| 23 virtual PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadabl eLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Re sourceLoaderOptions&) = 0; | |
| 24 virtual ~LoaderFactory() { } | |
| 25 DEFINE_INLINE_VIRTUAL_TRACE() { } | |
| 26 }; | |
| 27 | |
| 28 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>); | |
| 29 | |
| 30 // For testing. | |
| 31 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>, LoaderFactory*); | |
| 32 | |
| 33 ~FetchBlobDataConsumerHandle(); | |
| 34 | |
| 35 private: | |
| 36 FetchBlobDataConsumerHandle(ExecutionContext*, PassRefPtr<BlobDataHandle>, L oaderFactory*); | |
| 37 Reader* obtainReaderInternal(Client*) override; | |
| 38 | |
| 39 virtual const char* debugName() const override { return "FetchBlobDataConsum erHandle"; } | |
|
yhirano
2015/06/24 11:15:14
No virtual is needed
hiroshige
2015/06/24 11:29:48
Done.
| |
| 40 | |
| 41 class ReaderContext; | |
| 42 RefPtr<ReaderContext> m_readerContext; | |
| 43 }; | |
| 44 | |
| 45 } // namespace blink | |
| 46 | |
| 47 #endif // FetchBlobDataConsumerHandle_h | |
| OLD | NEW |