OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 private/ppb_isolated_file_system_private.idl, | 5 // From private/ppb_isolated_file_system_private.idl modified Tue Dec 3 |
6 // modified Mon Nov 25 11:17:07 2013. | 6 // 11:01:20 2013. |
7 | 7 |
8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/c/private/ppb_isolated_file_system_private.h" | 10 #include "ppapi/c/private/ppb_isolated_file_system_private.h" |
11 #include "ppapi/shared_impl/tracked_callback.h" | 11 #include "ppapi/shared_impl/tracked_callback.h" |
12 #include "ppapi/thunk/enter.h" | 12 #include "ppapi/thunk/enter.h" |
13 #include "ppapi/thunk/ppapi_thunk_export.h" | 13 #include "ppapi/thunk/ppapi_thunk_export.h" |
14 #include "ppapi/thunk/ppb_isolated_file_system_private_api.h" | 14 #include "ppapi/thunk/ppb_isolated_file_system_private_api.h" |
15 | 15 |
16 namespace ppapi { | 16 namespace ppapi { |
17 namespace thunk { | 17 namespace thunk { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 int32_t Open(PP_Instance instance, | 21 int32_t Open(PP_Instance instance, |
22 PP_IsolatedFileSystemType_Private type, | 22 PP_IsolatedFileSystemType_Private type, |
23 PP_Resource* file_system, | 23 PP_Resource* file_system, |
24 struct PP_CompletionCallback callback) { | 24 struct PP_CompletionCallback callback) { |
25 VLOG(4) << "PPB_IsolatedFileSystem_Private::Open()"; | 25 VLOG(4) << "PPB_IsolatedFileSystem_Private::Open()"; |
26 EnterInstanceAPI<PPB_IsolatedFileSystem_Private_API> enter(instance, | 26 EnterInstanceAPI<PPB_IsolatedFileSystem_Private_API> enter(instance, |
27 callback); | 27 callback); |
28 if (enter.failed()) | 28 if (enter.failed()) |
29 return enter.retval(); | 29 return enter.retval(); |
30 return enter.SetResult(enter.functions()->Open(instance, | 30 return enter.SetResult( |
31 type, | 31 enter.functions()->Open(instance, type, file_system, enter.callback())); |
32 file_system, | |
33 enter.callback())); | |
34 } | 32 } |
35 | 33 |
36 const PPB_IsolatedFileSystem_Private_0_2 | 34 const PPB_IsolatedFileSystem_Private_0_2 |
37 g_ppb_isolatedfilesystem_private_thunk_0_2 = { | 35 g_ppb_isolatedfilesystem_private_thunk_0_2 = {&Open}; |
38 &Open | |
39 }; | |
40 | 36 |
41 } // namespace | 37 } // namespace |
42 | 38 |
43 PPAPI_THUNK_EXPORT const PPB_IsolatedFileSystem_Private_0_2* | 39 PPAPI_THUNK_EXPORT const PPB_IsolatedFileSystem_Private_0_2* |
44 GetPPB_IsolatedFileSystem_Private_0_2_Thunk() { | 40 GetPPB_IsolatedFileSystem_Private_0_2_Thunk() { |
45 return &g_ppb_isolatedfilesystem_private_thunk_0_2; | 41 return &g_ppb_isolatedfilesystem_private_thunk_0_2; |
46 } | 42 } |
47 | 43 |
48 } // namespace thunk | 44 } // namespace thunk |
49 } // namespace ppapi | 45 } // namespace ppapi |
OLD | NEW |