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

Side by Side 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 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 #ifndef BlobBytesProvider_h
6 #define BlobBytesProvider_h
7
8 #include "platform/blob/BlobData.h"
9 #include "public/platform/blobs.mojom-blink.h"
10
11 namespace blink {
12
13 class BlobBytesProvider : public storage::mojom::blink::BytesProvider {
14 public:
15 BlobBytesProvider(RefPtr<RawData> data);
16 ~BlobBytesProvider() override;
17
18 void AppendData(RefPtr<RawData> data);
19
20 // BytesProvider implementation:
21 void RequestAsStream(mojo::ScopedDataPipeProducerHandle pipe) override;
22 void RequestAsFile(uint64_t source_offset,
23 uint64_t source_size,
24 base::File file,
25 uint64_t file_offset,
26 RequestAsFileCallback callback) override;
27 String uuid;
28
29 private:
30 Vector<RefPtr<RawData>> data_;
31 };
32
33 } // namespace blink
34
35 #endif // BlobBytesProvider_h
OLDNEW
« 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