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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchDataLoader.h

Issue 2684533002: [WIP] Mojofy respondwith
Patch Set: rebase Created 3 years, 8 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 FetchDataLoader_h 5 #ifndef FetchDataLoader_h
6 #define FetchDataLoader_h 6 #define FetchDataLoader_h
7 7
8 #include "core/dom/DOMArrayBuffer.h" 8 #include "core/dom/DOMArrayBuffer.h"
9 #include "core/streams/Stream.h" 9 #include "core/streams/Stream.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "mojo/public/cpp/system/data_pipe.h"
11 #include "platform/blob/BlobData.h" 12 #include "platform/blob/BlobData.h"
12 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
13 #include "wtf/Forward.h" 14 #include "wtf/Forward.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class BytesConsumer; 18 class BytesConsumer;
18 19
19 // FetchDataLoader subclasses 20 // FetchDataLoader subclasses
20 // 1. take a BytesConsumer, 21 // 1. take a BytesConsumer,
(...skipping 28 matching lines...) Expand all
49 50
50 virtual void didFetchDataLoadFailed() = 0; 51 virtual void didFetchDataLoadFailed() = 0;
51 52
52 DEFINE_INLINE_VIRTUAL_TRACE() {} 53 DEFINE_INLINE_VIRTUAL_TRACE() {}
53 }; 54 };
54 55
55 static FetchDataLoader* createLoaderAsBlobHandle(const String& mimeType); 56 static FetchDataLoader* createLoaderAsBlobHandle(const String& mimeType);
56 static FetchDataLoader* createLoaderAsArrayBuffer(); 57 static FetchDataLoader* createLoaderAsArrayBuffer();
57 static FetchDataLoader* createLoaderAsString(); 58 static FetchDataLoader* createLoaderAsString();
58 static FetchDataLoader* createLoaderAsStream(Stream* outStream); 59 static FetchDataLoader* createLoaderAsStream(Stream* outStream);
60 static FetchDataLoader* createLoaderAsDataPipe(
61 mojo::ScopedDataPipeProducerHandle handle);
59 62
60 virtual ~FetchDataLoader() {} 63 virtual ~FetchDataLoader() {}
61 64
62 // |consumer| must not have a client when called. 65 // |consumer| must not have a client when called.
63 virtual void start(BytesConsumer* /* consumer */, Client*) = 0; 66 virtual void start(BytesConsumer* /* consumer */, Client*) = 0;
64 67
65 virtual void cancel() = 0; 68 virtual void cancel() = 0;
66 69
67 DEFINE_INLINE_VIRTUAL_TRACE() {} 70 DEFINE_INLINE_VIRTUAL_TRACE() {}
68 }; 71 };
69 72
70 } // namespace blink 73 } // namespace blink
71 74
72 #endif // FetchDataLoader_h 75 #endif // FetchDataLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698