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

Unified Diff: third_party/WebKit/public/platform/blobs.mojom

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/public/platform/blobs.mojom
diff --git a/third_party/WebKit/public/platform/blobs.mojom b/third_party/WebKit/public/platform/blobs.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..1b73b5ba2f47665a6fc4d16571feaef551e7d5ab
--- /dev/null
+++ b/third_party/WebKit/public/platform/blobs.mojom
@@ -0,0 +1,65 @@
+// 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.
+
+module storage.mojom;
+
+import "mojo/common/file.mojom";
+import "mojo/common/time.mojom";
+import "url/mojo/url.mojom";
+
+struct DataElementBytes {
+ uint64 length;
+ BytesProvider data;
+};
+
+struct DataElementFile {
+ string path;
+ uint64 offset;
+ uint64 length;
+ mojo.common.mojom.Time expected_modification_time;
+};
+
+struct DataElementFilesystemURL {
+ url.mojom.Url url;
+ uint64 offset;
+ uint64 length;
+ mojo.common.mojom.Time expected_modification_time;
+};
+
+struct DataElementBlob {
+ Blob blob;
+ uint64 offset;
+ uint64 length;
+};
+
+union DataElement {
+ array<uint8> bytes;
+ DataElementBytes large_bytes;
+ DataElementFile file;
+ DataElementFilesystemURL file_filesystem;
+ DataElementBlob blob;
+};
+
+interface BlobRegistry {
+ // TODO(mek): Make this non-sync and get rid of UUID once enough of the rest
+ // of the system has been migrated to use mojo for blobs.
+ [Sync] Register(Blob& blob, string uuid, string content_type, string content_disposition, array<DataElement> elements) => ();
+
+ DeprecatedGetBlob(string uuid, Blob& blob);
+};
+
+interface Blob {
+ Clone(Blob& blob);
+
+ // Don't call this method. Should only be used by the blob system internals.
+ InternalGetUUID() => (string uuid);
+};
+
+interface BytesProvider {
+ RequestAsStream(handle<data_pipe_producer> pipe);
+ RequestAsFile(uint64 source_offset, uint64 source_size, mojo.common.mojom.File file, uint64 file_offset) => (mojo.common.mojom.Time? time_file_modified);
+};
+
+
+

Powered by Google App Engine
This is Rietveld 408576698