| 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 GarbageCollected<LoaderFactory> { |
| 22 public: |
| 23 virtual PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadabl
eLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Re
sourceLoaderOptions&) = 0; |
| 24 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 25 }; |
| 26 |
| 27 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef
Ptr<BlobDataHandle>); |
| 28 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef
Ptr<BlobDataHandle>, LoaderFactory*); |
| 29 |
| 30 private: |
| 31 FetchBlobDataConsumerHandle(ExecutionContext*, PassRefPtr<BlobDataHandle>, L
oaderFactory*); |
| 32 Reader* obtainReaderInternal(Client*) override; |
| 33 |
| 34 virtual const char* debugName() const override { return "FetchBlobDataConsum
erHandle"; } |
| 35 |
| 36 class ReaderContext; |
| 37 RefPtr<ReaderContext> m_readerContext; |
| 38 }; |
| 39 |
| 40 } // namespace blink |
| 41 |
| 42 #endif // FetchBlobDataConsumerHandle_h |
| OLD | NEW |