| 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 Tue Mar 25 14:43:09 2014. |
| 6 | |
| 7 #include <stdint.h> | |
| 8 | 6 |
| 9 #include "ppapi/c/pp_completion_callback.h" | 7 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
| 11 #include "ppapi/c/ppb_file_system.h" | 9 #include "ppapi/c/ppb_file_system.h" |
| 12 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
| 13 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
| 14 #include "ppapi/thunk/ppapi_thunk_export.h" | 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 15 #include "ppapi/thunk/ppb_file_system_api.h" | 13 #include "ppapi/thunk/ppb_file_system_api.h" |
| 16 | 14 |
| 17 namespace ppapi { | 15 namespace ppapi { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 44 } | 42 } |
| 45 | 43 |
| 46 PP_FileSystemType GetType(PP_Resource file_system) { | 44 PP_FileSystemType GetType(PP_Resource file_system) { |
| 47 VLOG(4) << "PPB_FileSystem::GetType()"; | 45 VLOG(4) << "PPB_FileSystem::GetType()"; |
| 48 EnterResource<PPB_FileSystem_API> enter(file_system, true); | 46 EnterResource<PPB_FileSystem_API> enter(file_system, true); |
| 49 if (enter.failed()) | 47 if (enter.failed()) |
| 50 return PP_FILESYSTEMTYPE_INVALID; | 48 return PP_FILESYSTEMTYPE_INVALID; |
| 51 return enter.object()->GetType(); | 49 return enter.object()->GetType(); |
| 52 } | 50 } |
| 53 | 51 |
| 54 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, |
| 55 &IsFileSystem, | 53 &Open, &GetType}; |
| 56 &Open, | |
| 57 &GetType}; | |
| 58 | 54 |
| 59 } // namespace | 55 } // namespace |
| 60 | 56 |
| 61 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() { |
| 62 return &g_ppb_filesystem_thunk_1_0; | 58 return &g_ppb_filesystem_thunk_1_0; |
| 63 } | 59 } |
| 64 | 60 |
| 65 } // namespace thunk | 61 } // namespace thunk |
| 66 } // namespace ppapi | 62 } // namespace ppapi |
| OLD | NEW |