Revert of Revert of "Remove SSLClientAuthHandler's RDH dependency." (https://coderevi...
[chromium-blink-merge.git] / ppapi / thunk / ppb_file_mapping_api.h
blob530d04b61afef466c7cadb8049171e838b690ae9
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"
15 namespace ppapi {
17 class TrackedCallback;
19 namespace thunk {
21 class PPAPI_THUNK_EXPORT PPB_FileMapping_API {
22 public:
23 virtual ~PPB_FileMapping_API() {}
25 virtual int32_t Map(PP_Instance instance,
26 PP_Resource file_io,
27 int64_t length,
28 uint32_t map_protection,
29 uint32_t map_flags,
30 int64_t offset,
31 void** address,
32 scoped_refptr<TrackedCallback> callback) = 0;
33 virtual int32_t Unmap(PP_Instance instance,
34 const void* address,
35 int64_t length,
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;
43 } // namespace thunk
44 } // namespace ppapi
46 #endif // PPAPI_THUNK_PPB_FILE_MAPPING_API_H_