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

Unified Diff: third_party/WebKit/Source/platform/blob/BlobBytesProvider.h

Issue 2892953006: WIP POC blob transport over mojo
Patch Set: pass mojo blobs over ipc Created 3 years, 7 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/platform/blob/BlobBytesProvider.h
diff --git a/third_party/WebKit/Source/platform/blob/BlobBytesProvider.h b/third_party/WebKit/Source/platform/blob/BlobBytesProvider.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3395d9fbbd21dc801be55f1c526ad19c67d74ef
--- /dev/null
+++ b/third_party/WebKit/Source/platform/blob/BlobBytesProvider.h
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BlobBytesProvider_h
+#define BlobBytesProvider_h
+
+#include "platform/blob/BlobData.h"
+#include "public/platform/blobs.mojom-blink.h"
+
+namespace blink {
+
+class BlobBytesProvider : public storage::mojom::blink::BytesProvider {
+ public:
+ BlobBytesProvider(RefPtr<RawData> data);
+ ~BlobBytesProvider() override;
+
+ void AppendData(RefPtr<RawData> data);
+
+ // BytesProvider implementation:
+ void RequestAsStream(mojo::ScopedDataPipeProducerHandle pipe) override;
+ void RequestAsFile(uint64_t source_offset,
+ uint64_t source_size,
+ base::File file,
+ uint64_t file_offset,
+ RequestAsFileCallback callback) override;
+ String uuid;
+
+ private:
+ Vector<RefPtr<RawData>> data_;
+};
+
+} // namespace blink
+
+#endif // BlobBytesProvider_h
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/blob/BlobBytesProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698