[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / ppapi / cpp / private / file_io_private.cc
blobb0f5a00f075334934c1fc86dc25300c5841932f4
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"
12 namespace pp {
14 namespace {
16 template <> const char* interface_name<PPB_FileIO_Private>() {
17 return PPB_FILEIO_PRIVATE_INTERFACE_0_1;
20 } // namespace
22 FileIO_Private::FileIO_Private()
23 : FileIO() {
26 FileIO_Private::FileIO_Private(const InstanceHandle& instance)
27 : FileIO(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(
34 pp_resource(),
35 cc.output(),
36 cc.pp_completion_callback());
37 return cc.MayForce(PP_ERROR_NOINTERFACE);
40 } // namespace pp