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 #include "ppapi/cpp/private/ext_crx_file_system_private.h" |
| 6 |
| 7 #include "ppapi/c/private/ppb_ext_crx_file_system_private.h" |
| 8 #include "ppapi/cpp/completion_callback.h" |
| 9 #include "ppapi/cpp/module_impl.h" |
| 10 |
| 11 namespace pp { |
| 12 |
| 13 namespace { |
| 14 |
| 15 template <> const char* interface_name<PPB_Ext_CrxFileSystem_Private_0_1>() { |
| 16 return PPB_EXT_CRXFILESYSTEM_PRIVATE_INTERFACE_0_1; |
| 17 } |
| 18 |
| 19 } // namespace |
| 20 |
| 21 ExtCrxFileSystemPrivate::ExtCrxFileSystemPrivate() { |
| 22 } |
| 23 |
| 24 ExtCrxFileSystemPrivate::ExtCrxFileSystemPrivate(const InstanceHandle& instance) |
| 25 : Resource() { |
| 26 if (!has_interface<PPB_Ext_CrxFileSystem_Private_0_1>()) |
| 27 return; |
| 28 PassRefFromConstructor(get_interface<PPB_Ext_CrxFileSystem_Private_0_1>()-> |
| 29 Create(instance.pp_instance())); |
| 30 } |
| 31 |
| 32 ExtCrxFileSystemPrivate::ExtCrxFileSystemPrivate( |
| 33 const ExtCrxFileSystemPrivate& other) |
| 34 : Resource(other) { |
| 35 } |
| 36 |
| 37 ExtCrxFileSystemPrivate::~ExtCrxFileSystemPrivate() { |
| 38 } |
| 39 |
| 40 int32_t ExtCrxFileSystemPrivate::Open(const CompletionCallback& cc) { |
| 41 if (!has_interface<PPB_Ext_CrxFileSystem_Private_0_1>()) |
| 42 return cc.MayForce(PP_ERROR_NOINTERFACE); |
| 43 return get_interface<PPB_Ext_CrxFileSystem_Private_0_1>()-> |
| 44 Open(pp_resource(), cc.pp_completion_callback()); |
| 45 } |
| 46 |
| 47 } // namespace pp |
OLD | NEW |