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.
5 #include "ppapi/cpp/private/file_io_private.h"
7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/private/ppb_file_io_private.h"
9 #include "ppapi/cpp/file_io.h"
10 #include "ppapi/cpp/module_impl.h"
16 template <> const char* interface_name
<PPB_FileIO_Private
>() {
17 return PPB_FILEIO_PRIVATE_INTERFACE_0_1
;
22 FileIO_Private::FileIO_Private()
26 FileIO_Private::FileIO_Private(const InstanceHandle
& instance
)
30 int32_t FileIO_Private::RequestOSFileHandle(
31 const CompletionCallbackWithOutput
<PassFileHandle
>& cc
) {
32 if (has_interface
<PPB_FileIO_Private
>())
33 return get_interface
<PPB_FileIO_Private
>()->RequestOSFileHandle(
36 cc
.pp_completion_callback());
37 return cc
.MayForce(PP_ERROR_NOINTERFACE
);