1 // Copyright 2014 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 // From ppb_file_mapping.idl modified Mon Jan 27 11:00:43 2014.
7 #include "ppapi/c/pp_completion_callback.h"
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/ppb_file_mapping.h"
10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/enter.h"
12 #include "ppapi/thunk/ppapi_thunk_export.h"
13 #include "ppapi/thunk/ppb_file_mapping_api.h"
20 int32_t Map(PP_Instance instance
,
23 uint32_t map_protection
,
27 struct PP_CompletionCallback callback
) {
28 VLOG(4) << "PPB_FileMapping::Map()";
29 EnterInstanceAPI
<PPB_FileMapping_API
> enter(instance
, callback
);
31 return enter
.retval();
32 return enter
.SetResult(enter
.functions()->Map(instance
,
42 int32_t Unmap(PP_Instance instance
,
45 struct PP_CompletionCallback callback
) {
46 VLOG(4) << "PPB_FileMapping::Unmap()";
47 EnterInstanceAPI
<PPB_FileMapping_API
> enter(instance
, callback
);
49 return enter
.retval();
50 return enter
.SetResult(enter
.functions()->Unmap(instance
,
56 int64_t GetMapPageSize(PP_Instance instance
) {
57 VLOG(4) << "PPB_FileMapping::GetMapPageSize()";
58 EnterInstanceAPI
<PPB_FileMapping_API
> enter(instance
);
61 return enter
.functions()->GetMapPageSize(instance
);
64 const PPB_FileMapping_0_1 g_ppb_filemapping_thunk_0_1
= {
72 PPAPI_THUNK_EXPORT
const PPB_FileMapping_0_1
* GetPPB_FileMapping_0_1_Thunk() {
73 return &g_ppb_filemapping_thunk_0_1
;