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

Side by Side Diff: ppapi/c/private/ppb_flash_file.h

Issue 11359097: Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 | Annotate | Revision Log
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 #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
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 // Does initialization necessary for proxying this interface on background 35 // Deprecated. Returns true.
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.
43 bool (*CreateThreadAdapterForInstance)(PP_Instance instance); 36 bool (*CreateThreadAdapterForInstance)(PP_Instance instance);
44 37 // Deprecated. Does nothing.
45 // Call when an instance is destroyed when you've previously called
46 // CreateThreadAdapterForInstance.
47 void (*ClearThreadAdapterForInstance)(PP_Instance instance); 38 void (*ClearThreadAdapterForInstance)(PP_Instance instance);
48 39
49 // Opens a file, returning a file descriptor (posix) or a HANDLE (win32) into 40 // Opens a file, returning a file descriptor (posix) or a HANDLE (win32) into
50 // file. The return value is the ppapi error, PP_OK if success, one of the 41 // file. The return value is the ppapi error, PP_OK if success, one of the
51 // PP_ERROR_* in case of failure. 42 // PP_ERROR_* in case of failure.
52 int32_t (*OpenFile)(PP_Instance instance, 43 int32_t (*OpenFile)(PP_Instance instance,
53 const char* path, 44 const char* path,
54 int32_t mode, 45 int32_t mode,
55 PP_FileHandle* file); 46 PP_FileHandle* file);
56 47
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // (except in taking FileRefs instead of paths, of course). We omit the 128 // (except in taking FileRefs instead of paths, of course). We omit the
138 // functionality which we do not provide for FileRefs. 129 // functionality which we do not provide for FileRefs.
139 int32_t (*OpenFile)(PP_Resource file_ref_id, 130 int32_t (*OpenFile)(PP_Resource file_ref_id,
140 int32_t mode, 131 int32_t mode,
141 PP_FileHandle* file); 132 PP_FileHandle* file);
142 int32_t (*QueryFile)(PP_Resource file_ref_id, 133 int32_t (*QueryFile)(PP_Resource file_ref_id,
143 struct PP_FileInfo* info); 134 struct PP_FileInfo* info);
144 }; 135 };
145 136
146 #endif // PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ 137 #endif // PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698