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// From private/ppb_isolated_file_system_private.idl,
6//   modified Mon Nov 25 11:17:07 2013.
7
8#include "ppapi/c/pp_completion_callback.h"
9#include "ppapi/c/pp_errors.h"
10#include "ppapi/c/private/ppb_isolated_file_system_private.h"
11#include "ppapi/shared_impl/tracked_callback.h"
12#include "ppapi/thunk/enter.h"
13#include "ppapi/thunk/ppapi_thunk_export.h"
14#include "ppapi/thunk/ppb_isolated_file_system_private_api.h"
15
16namespace ppapi {
17namespace thunk {
18
19namespace {
20
21int32_t Open(PP_Instance instance,
22             PP_IsolatedFileSystemType_Private type,
23             PP_Resource* file_system,
24             struct PP_CompletionCallback callback) {
25  VLOG(4) << "PPB_IsolatedFileSystem_Private::Open()";
26  EnterInstanceAPI<PPB_IsolatedFileSystem_Private_API> enter(instance,
27                                                             callback);
28  if (enter.failed())
29    return enter.retval();
30  return enter.SetResult(enter.functions()->Open(instance,
31                                                 type,
32                                                 file_system,
33                                                 enter.callback()));
34}
35
36const PPB_IsolatedFileSystem_Private_0_2
37    g_ppb_isolatedfilesystem_private_thunk_0_2 = {
38  &Open
39};
40
41}  // namespace
42
43PPAPI_THUNK_EXPORT const PPB_IsolatedFileSystem_Private_0_2*
44    GetPPB_IsolatedFileSystem_Private_0_2_Thunk() {
45  return &g_ppb_isolatedfilesystem_private_thunk_0_2;
46}
47
48}  // namespace thunk
49}  // namespace ppapi
50