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.
5 #include "ppapi/cpp/private/isolated_file_system_private.h"
7 #include "ppapi/cpp/module_impl.h"
13 template <> const char* interface_name
<PPB_IsolatedFileSystem_Private_0_2
>() {
14 return PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE_0_2
;
19 IsolatedFileSystemPrivate::IsolatedFileSystemPrivate()
20 : instance_(0), type_(PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID
) {
23 IsolatedFileSystemPrivate::IsolatedFileSystemPrivate(
24 const InstanceHandle
& instance
,
25 PP_IsolatedFileSystemType_Private type
)
26 : instance_(instance
.pp_instance()), type_(type
) {
29 IsolatedFileSystemPrivate::~IsolatedFileSystemPrivate() {
32 int32_t IsolatedFileSystemPrivate::Open(
33 const CompletionCallbackWithOutput
<pp::FileSystem
>& cc
) {
34 if (!has_interface
<PPB_IsolatedFileSystem_Private_0_2
>())
35 return cc
.MayForce(PP_ERROR_NOINTERFACE
);
36 return get_interface
<PPB_IsolatedFileSystem_Private_0_2
>()->
37 Open(instance_
, type_
, cc
.output(), cc
.pp_completion_callback());