Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_resource.h" | 8 #include "ppapi/c/pp_resource.h" |
| 9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
| 10 | 10 |
| 11 struct PP_CompletionCallback; | 11 struct PP_CompletionCallback; |
| 12 | 12 |
| 13 #define PPB_FILEIOTRUSTED_DEV_INTERFACE "PPB_FileIOTrusted(Dev);0.1" | 13 #define PPB_FILEIOTRUSTED_DEV_INTERFACE "PPB_FileIOTrusted(Dev);0.3" |
|
bbudge-google
2010/12/15 20:36:32
Should this be 0.2?
| |
| 14 | 14 |
| 15 // Available only to trusted implementations. | 15 // Available only to trusted implementations. |
| 16 struct PPB_FileIOTrusted_Dev { | 16 struct PPB_FileIOTrusted_Dev { |
| 17 // Returns a POSIX file descriptor corresponding to the given FileIO object. | 17 // Returns a POSIX file descriptor corresponding to the given FileIO object. |
| 18 // The FileIO object must have been opened with a successful call to | 18 // The FileIO object must have been opened with a successful call to |
| 19 // FileIO::Open. The file descriptor will be closed automatically when the | 19 // FileIO::Open. The file descriptor will be closed automatically when the |
| 20 // FileIO object is closed or destroyed. | 20 // FileIO object is closed or destroyed. |
| 21 int32_t (*GetOSFileDescriptor)(PP_Resource file_io); | 21 int32_t (*GetOSFileDescriptor)(PP_Resource file_io); |
| 22 | 22 |
| 23 // Notifies the browser that underlying file will be modified. This gives | 23 // Notifies the browser that underlying file will be modified. This gives |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 36 struct PP_CompletionCallback callback); | 36 struct PP_CompletionCallback callback); |
| 37 | 37 |
| 38 // TODO(darin): Maybe unify the above into a single WillChangeFileSize | 38 // TODO(darin): Maybe unify the above into a single WillChangeFileSize |
| 39 // method? The above methods have the advantage of mapping to PPB_FileIO | 39 // method? The above methods have the advantage of mapping to PPB_FileIO |
| 40 // Write and SetLength calls. WillChangeFileSize would require the caller to | 40 // Write and SetLength calls. WillChangeFileSize would require the caller to |
| 41 // compute the file size resulting from a Write call, which may be | 41 // compute the file size resulting from a Write call, which may be |
| 42 // undesirable. | 42 // undesirable. |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 #endif // PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ | 45 #endif // PPAPI_C_DEV_PPB_FILE_IO_TRUSTED_DEV_H_ |
| OLD | NEW |