| 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 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ | 5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ |
| 6 #define PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ | 6 #define PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // PPB_Flash_File_ModuleLocal -------------------------------------------------- | 25 // PPB_Flash_File_ModuleLocal -------------------------------------------------- |
| 26 #define PPB_FLASH_FILE_MODULELOCAL_INTERFACE_2_0 "PPB_Flash_File_ModuleLocal;2" | 26 #define PPB_FLASH_FILE_MODULELOCAL_INTERFACE_2_0 "PPB_Flash_File_ModuleLocal;2" |
| 27 #define PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0 "PPB_Flash_File_ModuleLocal;3" | 27 #define PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0 "PPB_Flash_File_ModuleLocal;3" |
| 28 #define PPB_FLASH_FILE_MODULELOCAL_INTERFACE \ | 28 #define PPB_FLASH_FILE_MODULELOCAL_INTERFACE \ |
| 29 PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0 | 29 PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0 |
| 30 | 30 |
| 31 // This interface provides (for Flash) synchronous access to module-local files. | 31 // This interface provides (for Flash) synchronous access to module-local files. |
| 32 // Module-local file paths are '/'-separated UTF-8 strings, relative to a | 32 // Module-local file paths are '/'-separated UTF-8 strings, relative to a |
| 33 // module-specific root. | 33 // module-specific root. |
| 34 struct PPB_Flash_File_ModuleLocal_3_0 { | 34 struct PPB_Flash_File_ModuleLocal_3_0 { |
| 35 // Deprecated. Returns true. | 35 // Does initialization necessary for proxying this interface on background |
| 36 // threads. You must always call this function before using any other |
| 37 // function in this interface for a given instance ID. |
| 38 // |
| 39 // Returns true if multithreaded access is supported. In this case you can |
| 40 // use the rest of the functions from background threads. You may not call |
| 41 // GetInterface or do any other PPAPI operations on background threads at |
| 42 // this time. |
| 36 bool (*CreateThreadAdapterForInstance)(PP_Instance instance); | 43 bool (*CreateThreadAdapterForInstance)(PP_Instance instance); |
| 37 // Deprecated. Does nothing. | 44 |
| 45 // Call when an instance is destroyed when you've previously called |
| 46 // CreateThreadAdapterForInstance. |
| 38 void (*ClearThreadAdapterForInstance)(PP_Instance instance); | 47 void (*ClearThreadAdapterForInstance)(PP_Instance instance); |
| 39 | 48 |
| 40 // Opens a file, returning a file descriptor (posix) or a HANDLE (win32) into | 49 // Opens a file, returning a file descriptor (posix) or a HANDLE (win32) into |
| 41 // file. The return value is the ppapi error, PP_OK if success, one of the | 50 // file. The return value is the ppapi error, PP_OK if success, one of the |
| 42 // PP_ERROR_* in case of failure. | 51 // PP_ERROR_* in case of failure. |
| 43 int32_t (*OpenFile)(PP_Instance instance, | 52 int32_t (*OpenFile)(PP_Instance instance, |
| 44 const char* path, | 53 const char* path, |
| 45 int32_t mode, | 54 int32_t mode, |
| 46 PP_FileHandle* file); | 55 PP_FileHandle* file); |
| 47 | 56 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // (except in taking FileRefs instead of paths, of course). We omit the | 137 // (except in taking FileRefs instead of paths, of course). We omit the |
| 129 // functionality which we do not provide for FileRefs. | 138 // functionality which we do not provide for FileRefs. |
| 130 int32_t (*OpenFile)(PP_Resource file_ref_id, | 139 int32_t (*OpenFile)(PP_Resource file_ref_id, |
| 131 int32_t mode, | 140 int32_t mode, |
| 132 PP_FileHandle* file); | 141 PP_FileHandle* file); |
| 133 int32_t (*QueryFile)(PP_Resource file_ref_id, | 142 int32_t (*QueryFile)(PP_Resource file_ref_id, |
| 134 struct PP_FileInfo* info); | 143 struct PP_FileInfo* info); |
| 135 }; | 144 }; |
| 136 | 145 |
| 137 #endif // PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ | 146 #endif // PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ |
| OLD | NEW |