Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: ppapi/thunk/ppb_file_mapping_api.h

Issue 69663002: PPAPI: Implement PPB_FileMapping on POSIX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build? Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/thunk/ppb_file_mapping_api.h
diff --git a/ppapi/thunk/ppb_file_mapping_api.h b/ppapi/thunk/ppb_file_mapping_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..bfde7d5fb860e809b0c892a4e91111f13c0da877
--- /dev/null
+++ b/ppapi/thunk/ppb_file_mapping_api.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
bbudge 2014/01/23 23:01:03 2014
dmichael (off chromium) 2014/01/24 20:02:50 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_THUNK_PPB_FILE_MAPPING_API_H_
+#define PPAPI_THUNK_PPB_FILE_MAPPING_API_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/ppb_file_mapping.h"
+#include "ppapi/shared_impl/singleton_resource_id.h"
+#include "ppapi/thunk/ppapi_thunk_export.h"
+
+namespace ppapi {
+
+class TrackedCallback;
+
+namespace thunk {
+
+class PPAPI_THUNK_EXPORT PPB_FileMapping_API {
+ public:
+ virtual ~PPB_FileMapping_API() {}
+
+ virtual int32_t Map(PP_Instance instance,
+ PP_Resource file_io,
+ int64_t length,
+ uint32_t map_protection,
+ uint32_t map_flags,
+ int64_t offset,
+ void** address,
+ scoped_refptr<TrackedCallback> callback) = 0;
+ virtual int32_t Unmap(PP_Instance instance,
+ const void* address,
+ int64_t length,
+ scoped_refptr<TrackedCallback> callback) = 0;
+ virtual int64_t GetMapPageSize(PP_Instance instance) = 0;
+
+ static const SingletonResourceID kSingletonResourceID =
+ FILE_MAPPING_SINGLETON_ID;
+};
+
+} // namespace thunk
+} // namespace ppapi
+
+#endif // PPAPI_THUNK_PPB_FILE_MAPPING_API_H_

Powered by Google App Engine
This is Rietveld 408576698