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

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

Issue 1199043004: Add tests to FetchBlobDataConsumerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@fix-tests
Patch Set: Created 5 years, 5 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 | « no previous file | Source/modules/fetch/FetchBlobDataConsumerHandleTest.cpp » ('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 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/fetch/FetchDataConsumerHandle.h" 11 #include "modules/fetch/FetchDataConsumerHandle.h"
11 #include "platform/blob/BlobData.h" 12 #include "platform/blob/BlobData.h"
12 #include "wtf/PassOwnPtr.h" 13 #include "wtf/PassOwnPtr.h"
13 #include "wtf/PassRefPtr.h" 14 #include "wtf/PassRefPtr.h"
14 #include "wtf/RefPtr.h" 15 #include "wtf/RefPtr.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
18 class ExecutionContext; 19 class ExecutionContext;
19 class FetchBlobDataConsumerHandle final : public FetchDataConsumerHandle { 20 class MODULES_EXPORT FetchBlobDataConsumerHandle final : public FetchDataConsume rHandle {
21 WTF_MAKE_NONCOPYABLE(FetchBlobDataConsumerHandle);
20 public: 22 public:
21 class LoaderFactory : public GarbageCollectedFinalized<LoaderFactory> { 23 class MODULES_EXPORT LoaderFactory : public GarbageCollectedFinalized<Loader Factory> {
22 public: 24 public:
23 virtual PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadabl eLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Re sourceLoaderOptions&) = 0; 25 virtual PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadabl eLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Re sourceLoaderOptions&) = 0;
24 virtual ~LoaderFactory() { } 26 virtual ~LoaderFactory() { }
25 DEFINE_INLINE_VIRTUAL_TRACE() { } 27 DEFINE_INLINE_VIRTUAL_TRACE() { }
26 }; 28 };
27 29
28 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>); 30 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>);
29 31
30 // For testing. 32 // For testing.
31 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>, LoaderFactory*); 33 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef Ptr<BlobDataHandle>, LoaderFactory*);
32 34
33 ~FetchBlobDataConsumerHandle(); 35 ~FetchBlobDataConsumerHandle();
34 36
35 private: 37 private:
36 FetchBlobDataConsumerHandle(ExecutionContext*, PassRefPtr<BlobDataHandle>, L oaderFactory*); 38 FetchBlobDataConsumerHandle(ExecutionContext*, PassRefPtr<BlobDataHandle>, L oaderFactory*);
37 Reader* obtainReaderInternal(Client*) override; 39 Reader* obtainReaderInternal(Client*) override;
38 40
39 const char* debugName() const override { return "FetchBlobDataConsumerHandle "; } 41 const char* debugName() const override { return "FetchBlobDataConsumerHandle "; }
40 42
41 class ReaderContext; 43 class ReaderContext;
42 RefPtr<ReaderContext> m_readerContext; 44 RefPtr<ReaderContext> m_readerContext;
43 }; 45 };
44 46
45 } // namespace blink 47 } // namespace blink
46 48
47 #endif // FetchBlobDataConsumerHandle_h 49 #endif // FetchBlobDataConsumerHandle_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/fetch/FetchBlobDataConsumerHandleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698