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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchDataLoader.h

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Addressed comments from kinuko and haraken 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
diff --git a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
index 62065b1d9891982bdffe20a3cd35e7bfa172213e..d379e5e0b01d781594930b5d9cb4ce033d5de6d3 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
@@ -8,6 +8,7 @@
#include "core/dom/DOMArrayBuffer.h"
#include "core/streams/Stream.h"
#include "modules/ModulesExport.h"
+#include "mojo/public/cpp/system/data_pipe.h"
#include "platform/blob/BlobData.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Forward.h"
@@ -42,8 +43,8 @@ class MODULES_EXPORT FetchDataLoader
}
virtual void DidFetchDataLoadedString(const String&) { NOTREACHED(); }
// This is called after all data are read from |handle| and written
- // to |outStream|, and |outStream| is closed or aborted.
- virtual void DidFetchDataLoadedStream() { NOTREACHED(); }
+ // to |out_data_pipe|, and |out_data_pipe| is closed or aborted.
+ virtual void DidFetchDataLoadedDataPipe() { NOTREACHED(); }
// This function is called when a "custom" FetchDataLoader (none of the
// ones listed above) finishes loading.
@@ -57,7 +58,9 @@ class MODULES_EXPORT FetchDataLoader
static FetchDataLoader* CreateLoaderAsBlobHandle(const String& mime_type);
static FetchDataLoader* CreateLoaderAsArrayBuffer();
static FetchDataLoader* CreateLoaderAsString();
- static FetchDataLoader* CreateLoaderAsStream(Stream*);
+ static FetchDataLoader* CreateLoaderAsDataPipe(
+ mojo::ScopedDataPipeProducerHandle out_data_pipe);
+
virtual ~FetchDataLoader() {}
// |consumer| must not have a client when called.
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/DEPS ('k') | third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698