OLD | NEW |
---|---|
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
6 /* | 6 /* |
7 * This file defines the trusted file IO interface | 7 * This file defines the trusted file IO interface |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M14= 0.4 | 11 M14= 0.4 |
raymes
2012/11/26 22:30:54
Please fix the spacing while you're here (to M14 =
victorhsieh
2012/11/27 09:44:42
Done.
| |
12 }; | 12 }; |
13 | 13 |
14 // Available only to trusted implementations. | 14 // Available only to trusted implementations. |
15 interface PPB_FileIOTrusted { | 15 interface PPB_FileIOTrusted { |
16 /** | 16 /** |
17 * Returns a file descriptor corresponding to the given FileIO object. On | 17 * Returns a file descriptor corresponding to the given FileIO object. On |
18 * Windows, returns a HANDLE; on all other platforms, returns a POSIX file | 18 * Windows, returns a HANDLE; on all other platforms, returns a POSIX file |
19 * descriptor. The FileIO object must have been opened with a successful | 19 * descriptor. The FileIO object must have been opened with a successful |
20 * call to FileIO::Open. The file descriptor will be closed automatically | 20 * call to FileIO::Open. The file descriptor will be closed automatically |
21 * when the FileIO object is closed or destroyed. | 21 * when the FileIO object is closed or destroyed. |
22 */ | 22 */ |
23 [deprecate=0.5] | |
raymes
2012/11/26 22:30:54
You need to add 0.5 to the "label Chrome" above to
raymes
2012/11/26 22:33:45
Also I'm curious what the background is behind thi
brettw
2012/11/26 23:38:45
This was only used to implement the SRPC NaCl prox
victorhsieh
2012/11/27 09:44:42
Even with 0.5 label above, the generator won't gen
raymes
2012/11/27 16:41:30
Interesting. It worked for me when I recently revv
| |
23 int32_t GetOSFileDescriptor([in] PP_Resource file_io); | 24 int32_t GetOSFileDescriptor([in] PP_Resource file_io); |
24 | 25 |
25 /** | 26 /** |
26 * Notifies the browser that underlying file will be modified. This gives | 27 * Notifies the browser that underlying file will be modified. This gives |
27 * the browser the opportunity to apply quota restrictions and possibly | 28 * the browser the opportunity to apply quota restrictions and possibly |
28 * return an error to indicate that the write is not allowed. | 29 * return an error to indicate that the write is not allowed. |
29 */ | 30 */ |
30 int32_t WillWrite([in] PP_Resource file_io, | 31 int32_t WillWrite([in] PP_Resource file_io, |
31 [in] int64_t offset, | 32 [in] int64_t offset, |
32 [in] int32_t bytes_to_write, | 33 [in] int32_t bytes_to_write, |
33 [in] PP_CompletionCallback callback); | 34 [in] PP_CompletionCallback callback); |
34 | 35 |
35 /** | 36 /** |
36 * Notifies the browser that underlying file will be modified. This gives | 37 * Notifies the browser that underlying file will be modified. This gives |
37 * the browser the opportunity to apply quota restrictions and possibly | 38 * the browser the opportunity to apply quota restrictions and possibly |
38 * return an error to indicate that the write is not allowed. | 39 * return an error to indicate that the write is not allowed. |
39 * | 40 * |
40 * TODO(darin): Maybe unify the above into a single WillChangeFileSize | 41 * TODO(darin): Maybe unify the above into a single WillChangeFileSize |
41 * method? The above methods have the advantage of mapping to PPB_FileIO | 42 * method? The above methods have the advantage of mapping to PPB_FileIO |
42 * Write and SetLength calls. WillChangeFileSize would require the caller to | 43 * Write and SetLength calls. WillChangeFileSize would require the caller to |
43 * compute the file size resulting from a Write call, which may be | 44 * compute the file size resulting from a Write call, which may be |
44 * undesirable. | 45 * undesirable. |
45 */ | 46 */ |
46 int32_t WillSetLength([in] PP_Resource file_io, | 47 int32_t WillSetLength([in] PP_Resource file_io, |
47 [in] int64_t length, | 48 [in] int64_t length, |
48 [in] PP_CompletionCallback callback); | 49 [in] PP_CompletionCallback callback); |
49 | 50 |
50 }; | 51 }; |
51 | 52 |
OLD | NEW |