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

Side by Side Diff: components/filesystem/public/interfaces/file.mojom

Issue 2539383002: Replace base::File wrapping with typemapping. (Closed)
Patch Set: Created 4 years 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(vtl): notes to self: 5 // TODO(vtl): notes to self:
6 // - file offsets, file positions, and file sizes are int64 (though positions 6 // - file offsets, file positions, and file sizes are int64 (though positions
7 // and sizes must always be non-negative) 7 // and sizes must always be non-negative)
8 // - buffer size parameters (for read/write) are uint32 8 // - buffer size parameters (for read/write) are uint32
9 9
10 module filesystem.mojom; 10 module filesystem.mojom;
11 11
12 import "components/filesystem/public/interfaces/types.mojom"; 12 import "components/filesystem/public/interfaces/types.mojom";
13 import "mojo/common/common_custom_types.mojom";
13 14
14 // TODO(vtl): Write comments. 15 // TODO(vtl): Write comments.
15 interface File { 16 interface File {
16 // Flushes/closes this file; no operations may be performed on this file after 17 // Flushes/closes this file; no operations may be performed on this file after
17 // this. Note that any error code is strictly informational -- the close may 18 // this. Note that any error code is strictly informational -- the close may
18 // not be retried. 19 // not be retried.
19 [Sync] 20 [Sync]
20 Close() => (FileError err); 21 Close() => (FileError err);
21 22
22 // Reads (at most) |num_bytes_to_read| from the location specified by 23 // Reads (at most) |num_bytes_to_read| from the location specified by
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // this file). 78 // this file).
78 [Sync] 79 [Sync]
79 Lock() => (FileError error); 80 Lock() => (FileError error);
80 81
81 // Unlocks a previously locked file. 82 // Unlocks a previously locked file.
82 [Sync] 83 [Sync]
83 Unlock() => (FileError error); 84 Unlock() => (FileError error);
84 85
85 // Returns a handle to the file for raw access. 86 // Returns a handle to the file for raw access.
86 [Sync] 87 [Sync]
87 AsHandle() => (FileError error, handle file_handle); 88 AsHandle() => (FileError error, mojo.common.mojom.File? file_handle);
88 }; 89 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698