| OLD | NEW |
| (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 |
| OLD | NEW |