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

Side by Side 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, 6 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module storage.mojom;
6
7 import "mojo/common/file.mojom";
8 import "mojo/common/time.mojom";
9 import "url/mojo/url.mojom";
10
11 struct DataElementBytes {
12 uint64 length;
13 BytesProvider data;
14 };
15
16 struct DataElementFile {
17 string path;
18 uint64 offset;
19 uint64 length;
20 mojo.common.mojom.Time expected_modification_time;
21 };
22
23 struct DataElementFilesystemURL {
24 url.mojom.Url url;
25 uint64 offset;
26 uint64 length;
27 mojo.common.mojom.Time expected_modification_time;
28 };
29
30 struct DataElementBlob {
31 Blob blob;
32 uint64 offset;
33 uint64 length;
34 };
35
36 union DataElement {
37 array<uint8> bytes;
38 DataElementBytes large_bytes;
39 DataElementFile file;
40 DataElementFilesystemURL file_filesystem;
41 DataElementBlob blob;
42 };
43
44 interface BlobRegistry {
45 // TODO(mek): Make this non-sync and get rid of UUID once enough of the rest
46 // of the system has been migrated to use mojo for blobs.
47 [Sync] Register(Blob& blob, string uuid, string content_type, string content_d isposition, array<DataElement> elements) => ();
48
49 DeprecatedGetBlob(string uuid, Blob& blob);
50 };
51
52 interface Blob {
53 Clone(Blob& blob);
54
55 // Don't call this method. Should only be used by the blob system internals.
56 InternalGetUUID() => (string uuid);
57 };
58
59 interface BytesProvider {
60 RequestAsStream(handle<data_pipe_producer> pipe);
61 RequestAsFile(uint64 source_offset, uint64 source_size, mojo.common.mojom.File file, uint64 file_offset) => (mojo.common.mojom.Time? time_file_modified);
62 };
63
64
65
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698