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 #ifndef PPAPI_THUNK_PPB_FILE_MAPPING_API_H_
6 #define PPAPI_THUNK_PPB_FILE_MAPPING_API_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/ppb_file_mapping.h"
12 #include "ppapi/shared_impl/singleton_resource_id.h"
13 #include "ppapi/thunk/ppapi_thunk_export.h"
17 class TrackedCallback
;
21 class PPAPI_THUNK_EXPORT PPB_FileMapping_API
{
23 virtual ~PPB_FileMapping_API() {}
25 virtual int32_t Map(PP_Instance instance
,
28 uint32_t map_protection
,
32 scoped_refptr
<TrackedCallback
> callback
) = 0;
33 virtual int32_t Unmap(PP_Instance instance
,
36 scoped_refptr
<TrackedCallback
> callback
) = 0;
37 virtual int64_t GetMapPageSize(PP_Instance instance
) = 0;
39 static const SingletonResourceID kSingletonResourceID
=
40 FILE_MAPPING_SINGLETON_ID
;
46 #endif // PPAPI_THUNK_PPB_FILE_MAPPING_API_H_