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

Unified Diff: ppapi/c/ppb_file_mapping.h

Issue 69663002: PPAPI: Implement PPB_FileMapping on POSIX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rough patch. Starting testing. 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
« no previous file with comments | « ppapi/c/dev/ppb_file_io_dev.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/ppb_file_mapping.h
diff --git a/ppapi/c/dev/ppb_file_io_dev.h b/ppapi/c/ppb_file_mapping.h
similarity index 82%
rename from ppapi/c/dev/ppb_file_io_dev.h
rename to ppapi/c/ppb_file_mapping.h
index a60d3a64c103e1cf13916acf7a4d5544b5ef8c05..274c34b974852cac64fffef551e90784f09cbd9e 100644
--- a/ppapi/c/dev/ppb_file_io_dev.h
+++ b/ppapi/c/ppb_file_mapping.h
@@ -3,19 +3,18 @@
* found in the LICENSE file.
*/
-/* From dev/ppb_file_io_dev.idl modified Thu Sep 19 10:07:03 2013. */
+/* From ppb_file_mapping.idl modified Tue Dec 17 14:05:45 2013. */
-#ifndef PPAPI_C_DEV_PPB_FILE_IO_DEV_H_
-#define PPAPI_C_DEV_PPB_FILE_IO_DEV_H_
+#ifndef PPAPI_C_PPB_FILE_MAPPING_H_
+#define PPAPI_C_PPB_FILE_MAPPING_H_
#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
-#define PPB_FILEIO_DEV_INTERFACE_0_1 "PPB_FileIO(Dev);0.1"
-#define PPB_FILEIO_DEV_INTERFACE PPB_FILEIO_DEV_INTERFACE_0_1
-
+#define PPB_FILEMAPPING_INTERFACE_0_1 "PPB_FileMapping;0.1" /* dev */
/**
* @file
* This file defines methods for use with a PPB_FileIO resource that may become
@@ -74,12 +73,12 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapFlags, 4);
* @{
*/
/**
- * PPB_FileIO_Dev contains functions that are usable with PPB_FileIO resources
+ * PPB_FileMapping contains functions that are usable with PPB_FileIO resources
* but aren't yet considered stable yet and thus are not supported for general
* NaCl or PNaCl apps yet. Features here are being tested and refined for
* possible future inclusion in (stable) PPB_FileIO.
*/
-struct PPB_FileIO_Dev_0_1 {
+struct PPB_FileMapping_0_1 { /* dev */
/**
* Map() maps the contents from an offset of the file into memory.
*
@@ -105,7 +104,8 @@ struct PPB_FileIO_Dev_0_1 {
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
*/
- int32_t (*Map)(PP_Resource file_io,
+ int32_t (*Map)(PP_Instance instance,
+ PP_Resource file_io,
int64_t length,
uint32_t map_protection,
uint32_t map_flags,
@@ -113,26 +113,24 @@ struct PPB_FileIO_Dev_0_1 {
void** address,
struct PP_CompletionCallback callback);
/**
- * Unmap() deletes the mapping of the specified address address to a
- * file io. The specified address must have been retrieved with
- * Map().
- * @param[in] file_io A PP_Resource corresponding to a file.
+ * Unmap() deletes the mapping of the specified address. The specified
+ * address must have been retrieved with Map().
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance.
* @param[in] address The starting address of the address in memory to
* be unmapped.
* @param[in] length The length of the region to unmap.
*/
- void (*Unmap)(PP_Resource file_io, void* address, int64_t length);
+ void (*Unmap)(PP_Instance file_io, void* address, int64_t length);
/**
* GetMapPageSize() returns the size of pages that Map() uses. Returns 0 on
* failure.
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance.
*/
- int64_t (*GetMapPageSize)(PP_Resource file_io);
+ int64_t (*GetMapPageSize)(PP_Instance file_io);
};
-
-typedef struct PPB_FileIO_Dev_0_1 PPB_FileIO_Dev;
/**
* @}
*/
-#endif /* PPAPI_C_DEV_PPB_FILE_IO_DEV_H_ */
+#endif /* PPAPI_C_PPB_FILE_MAPPING_H_ */
« no previous file with comments | « ppapi/c/dev/ppb_file_io_dev.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698