mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 16:26:10 +03:00
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
// Copyright 2018 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 blink.mojom;
|
|
|
|
import "mojo/public/mojom/base/file_error.mojom";
|
|
import "third_party/blink/public/mojom/blob/blob.mojom";
|
|
|
|
// Interface provided to the renderer to let a renderer write data to a file.
|
|
interface FileWriter {
|
|
// Write data from |blob| to the given |position| in the file being written
|
|
// to. Returns whether the operation succeeded and if so how many bytes were
|
|
// written.
|
|
// TODO(mek): This might need some way of reporting progress events back to
|
|
// the renderer.
|
|
Write(uint64 position, Blob blob) => (mojo_base.mojom.FileError result,
|
|
uint64 bytes_written);
|
|
|
|
// Changes the length of the file to be |length|. If |length| is larger than
|
|
// the current size of the file, the file will be extended, and the extended
|
|
// part is filled with null bytes.
|
|
Truncate(uint64 length) => (mojo_base.mojom.FileError result);
|
|
};
|