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" | |
yzshen1
2013/05/02 23:22:01
You have included it in the .h.
victorhsieh
2013/05/03 17:26:58
Done.
| |
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( | |
25 const InstanceHandle& instance) { | |
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 } | |
34 | |
35 int32_t ExtCrxFileSystemPrivate::Open( | |
36 const CompletionCallbackWithOutput<pp::FileSystem>& cc) { | |
37 if (!has_interface<PPB_Ext_CrxFileSystem_Private_0_1>()) | |
38 return cc.MayForce(PP_ERROR_NOINTERFACE); | |
39 return get_interface<PPB_Ext_CrxFileSystem_Private_0_1>()-> | |
40 Open(pp_resource(), cc.output(), cc.pp_completion_callback()); | |
41 } | |
42 | |
43 } // namespace pp | |
OLD | NEW |