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 // From ppb_file_system.idl modified Wed May 15 13:57:07 2013. | 5 // From ppb_file_system.idl modified Fri Jun 13 10:40:42 2014. |
6 | 6 |
7 #include "ppapi/c/pp_completion_callback.h" | 7 #include "ppapi/c/pp_completion_callback.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/c/ppb_file_system.h" | 9 #include "ppapi/c/ppb_file_system.h" |
10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
11 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
12 #include "ppapi/thunk/ppapi_thunk_export.h" | 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
13 #include "ppapi/thunk/ppb_file_system_api.h" | 13 #include "ppapi/thunk/ppb_file_system_api.h" |
14 | 14 |
15 namespace ppapi { | 15 namespace ppapi { |
(...skipping 26 matching lines...) Expand all Loading... |
42 } | 42 } |
43 | 43 |
44 PP_FileSystemType GetType(PP_Resource file_system) { | 44 PP_FileSystemType GetType(PP_Resource file_system) { |
45 VLOG(4) << "PPB_FileSystem::GetType()"; | 45 VLOG(4) << "PPB_FileSystem::GetType()"; |
46 EnterResource<PPB_FileSystem_API> enter(file_system, true); | 46 EnterResource<PPB_FileSystem_API> enter(file_system, true); |
47 if (enter.failed()) | 47 if (enter.failed()) |
48 return PP_FILESYSTEMTYPE_INVALID; | 48 return PP_FILESYSTEMTYPE_INVALID; |
49 return enter.object()->GetType(); | 49 return enter.object()->GetType(); |
50 } | 50 } |
51 | 51 |
52 const PPB_FileSystem_1_0 g_ppb_filesystem_thunk_1_0 = {&Create, | 52 const PPB_FileSystem_1_0 g_ppb_filesystem_thunk_1_0 = {&Create, &IsFileSystem, |
53 &IsFileSystem, | 53 &Open, &GetType}; |
54 &Open, | |
55 &GetType}; | |
56 | 54 |
57 } // namespace | 55 } // namespace |
58 | 56 |
59 PPAPI_THUNK_EXPORT const PPB_FileSystem_1_0* GetPPB_FileSystem_1_0_Thunk() { | 57 PPAPI_THUNK_EXPORT const PPB_FileSystem_1_0* GetPPB_FileSystem_1_0_Thunk() { |
60 return &g_ppb_filesystem_thunk_1_0; | 58 return &g_ppb_filesystem_thunk_1_0; |
61 } | 59 } |
62 | 60 |
63 } // namespace thunk | 61 } // namespace thunk |
64 } // namespace ppapi | 62 } // namespace ppapi |
OLD | NEW |