OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ppapi/cpp/private/plugin_private_file_system_private.h" |
| 6 |
| 7 #include "ppapi/c/private/ppb_plugin_private_file_system_private.h" |
| 8 #include "ppapi/cpp/module_impl.h" |
| 9 |
| 10 namespace pp { |
| 11 |
| 12 namespace { |
| 13 |
| 14 template <> |
| 15 const char* interface_name<PPB_PluginPrivateFileSystem_Private_0_1>() { |
| 16 return PPB_PLUGINPRIVATEFILESYSTEM_PRIVATE_INTERFACE_0_1; |
| 17 } |
| 18 |
| 19 } // namespace |
| 20 |
| 21 PluginPrivateFileSystemPrivate::PluginPrivateFileSystemPrivate() { |
| 22 } |
| 23 |
| 24 PluginPrivateFileSystemPrivate::PluginPrivateFileSystemPrivate( |
| 25 const InstanceHandle& instance) : instance_(instance.pp_instance()) { |
| 26 } |
| 27 |
| 28 PluginPrivateFileSystemPrivate::~PluginPrivateFileSystemPrivate() { |
| 29 } |
| 30 |
| 31 int32_t PluginPrivateFileSystemPrivate::Open( |
| 32 const CompletionCallbackWithOutput<pp::FileSystem>& cc) { |
| 33 if (!has_interface<PPB_PluginPrivateFileSystem_Private_0_1>()) |
| 34 return cc.MayForce(PP_ERROR_NOINTERFACE); |
| 35 return get_interface<PPB_PluginPrivateFileSystem_Private_0_1>()-> |
| 36 Open(instance_, cc.output(), cc.pp_completion_callback()); |
| 37 } |
| 38 |
| 39 } // namespace pp |
OLD | NEW |