Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // From private/ppb_ext_crx_file_system_private.idl, | |
| 6 // modified Thu May 2 08:41:39 2013. | |
| 7 | |
| 8 #include "ppapi/c/pp_completion_callback.h" | |
| 9 #include "ppapi/c/pp_errors.h" | |
| 10 #include "ppapi/c/private/ppb_ext_crx_file_system_private.h" | |
| 11 #include "ppapi/shared_impl/tracked_callback.h" | |
| 12 #include "ppapi/thunk/enter.h" | |
| 13 #include "ppapi/thunk/ppb_ext_crx_file_system_private_api.h" | |
| 14 #include "ppapi/thunk/ppb_instance_api.h" | |
| 15 #include "ppapi/thunk/resource_creation_api.h" | |
| 16 #include "ppapi/thunk/thunk.h" | |
| 17 | |
| 18 namespace ppapi { | |
| 19 namespace thunk { | |
| 20 | |
| 21 namespace { | |
| 22 | |
| 23 PP_Resource Create(PP_Instance insance) { | |
|
palmer
2013/05/02 21:30:09
Typo
| |
| 24 VLOG(4) << "PPB_Ext_CrxFileSystem_Private::Create()"; | |
| 25 EnterResourceCreation enter(insance); | |
| 26 if (enter.failed()) | |
| 27 return 0; | |
| 28 return enter.functions()->CreateExtCrxFileSystemPrivate(insance); | |
| 29 } | |
| 30 | |
| 31 int32_t Open(PP_Resource crxfs, | |
| 32 PP_Resource* file_system, | |
| 33 struct PP_CompletionCallback callback) { | |
| 34 VLOG(4) << "PPB_Ext_CrxFileSystem_Private::Open()"; | |
| 35 EnterResource<PPB_Ext_CrxFileSystem_Private_API> enter(crxfs, callback, true); | |
| 36 if (enter.failed()) | |
| 37 return enter.retval(); | |
| 38 return enter.SetResult(enter.object()->Open(file_system, enter.callback())); | |
| 39 } | |
| 40 | |
| 41 const PPB_Ext_CrxFileSystem_Private_0_1 | |
| 42 g_ppb_ext_crxfilesystem_private_thunk_0_1 = { | |
| 43 &Create, | |
| 44 &Open | |
| 45 }; | |
| 46 | |
| 47 } // namespace | |
| 48 | |
| 49 const PPB_Ext_CrxFileSystem_Private_0_1* | |
| 50 GetPPB_Ext_CrxFileSystem_Private_0_1_Thunk() { | |
| 51 return &g_ppb_ext_crxfilesystem_private_thunk_0_1; | |
| 52 } | |
| 53 | |
| 54 } // namespace thunk | |
| 55 } // namespace ppapi | |
| OLD | NEW |