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

Side by Side Diff: ppapi/c/trusted/ppb_file_io_trusted.h

Issue 13032002: Add RequestOSFileHandle as a private PPAPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed comments Created 7 years, 8 months 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 (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 /* From trusted/ppb_file_io_trusted.idl modified Wed Oct 5 14:06:02 2011. */ 6 /* From trusted/ppb_file_io_trusted.idl modified Tue Mar 26 20:38:45 2013. */
7 7
8 #ifndef PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_ 8 #ifndef PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_
9 #define PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_ 9 #define PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_
10 10
11 #include "ppapi/c/pp_completion_callback.h" 11 #include "ppapi/c/pp_completion_callback.h"
12 #include "ppapi/c/pp_macros.h" 12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_resource.h" 13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 15
16 #define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4" 16 #define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4"
(...skipping 11 matching lines...) Expand all
28 * @{ 28 * @{
29 */ 29 */
30 /* Available only to trusted implementations. */ 30 /* Available only to trusted implementations. */
31 struct PPB_FileIOTrusted_0_4 { 31 struct PPB_FileIOTrusted_0_4 {
32 /** 32 /**
33 * Returns a file descriptor corresponding to the given FileIO object. On 33 * Returns a file descriptor corresponding to the given FileIO object. On
34 * Windows, returns a HANDLE; on all other platforms, returns a POSIX file 34 * Windows, returns a HANDLE; on all other platforms, returns a POSIX file
35 * descriptor. The FileIO object must have been opened with a successful 35 * descriptor. The FileIO object must have been opened with a successful
36 * call to FileIO::Open. The file descriptor will be closed automatically 36 * call to FileIO::Open. The file descriptor will be closed automatically
37 * when the FileIO object is closed or destroyed. 37 * when the FileIO object is closed or destroyed.
38 *
39 * TODO(hamaji): Remove this and use GetOSFileHandle instead.
38 */ 40 */
39 int32_t (*GetOSFileDescriptor)(PP_Resource file_io); 41 int32_t (*GetOSFileDescriptor)(PP_Resource file_io);
40 /** 42 /**
41 * Notifies the browser that underlying file will be modified. This gives 43 * Notifies the browser that underlying file will be modified. This gives
42 * the browser the opportunity to apply quota restrictions and possibly 44 * the browser the opportunity to apply quota restrictions and possibly
43 * return an error to indicate that the write is not allowed. 45 * return an error to indicate that the write is not allowed.
44 */ 46 */
45 int32_t (*WillWrite)(PP_Resource file_io, 47 int32_t (*WillWrite)(PP_Resource file_io,
46 int64_t offset, 48 int64_t offset,
47 int32_t bytes_to_write, 49 int32_t bytes_to_write,
(...skipping 14 matching lines...) Expand all
62 struct PP_CompletionCallback callback); 64 struct PP_CompletionCallback callback);
63 }; 65 };
64 66
65 typedef struct PPB_FileIOTrusted_0_4 PPB_FileIOTrusted; 67 typedef struct PPB_FileIOTrusted_0_4 PPB_FileIOTrusted;
66 /** 68 /**
67 * @} 69 * @}
68 */ 70 */
69 71
70 #endif /* PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_ */ 72 #endif /* PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_ */
71 73
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698