| 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
|
|
|