summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--native_client_sdk/src/libraries/ppapi/library.dsc2
-rw-r--r--ppapi/api/dev/ppb_file_io_dev.idl116
-rw-r--r--ppapi/api/ppb_file_mapping.idl129
-rw-r--r--ppapi/c/dev/ppb_file_io_dev.h138
-rw-r--r--ppapi/c/ppb_file_mapping.h147
-rw-r--r--ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c68
6 files changed, 311 insertions, 289 deletions
diff --git a/native_client_sdk/src/libraries/ppapi/library.dsc b/native_client_sdk/src/libraries/ppapi/library.dsc
index 6819359..7daddd7 100644
--- a/native_client_sdk/src/libraries/ppapi/library.dsc
+++ b/native_client_sdk/src/libraries/ppapi/library.dsc
@@ -25,6 +25,7 @@
'ppb_console.h',
'ppb_core.h',
'ppb_file_io.h',
+ 'ppb_file_mapping.h',
'ppb_file_ref.h',
'ppb_file_system.h',
'ppb_fullscreen.h',
@@ -98,7 +99,6 @@
'ppb_cursor_control_dev.h',
'ppb_device_ref_dev.h',
'ppb_file_chooser_dev.h',
- 'ppb_file_io_dev.h',
'ppb_find_dev.h',
'ppb_font_dev.h',
'ppb_gles_chromium_texture_mapping_dev.h',
diff --git a/ppapi/api/dev/ppb_file_io_dev.idl b/ppapi/api/dev/ppb_file_io_dev.idl
deleted file mode 100644
index 82a64521..0000000
--- a/ppapi/api/dev/ppb_file_io_dev.idl
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-/**
- * This file defines methods for use with a PPB_FileIO resource that may become
- * stable in the future. For now, they can be used only in plugins with DEV
- * permissions.
- */
-
-label Chrome {
- M31 = 0.1
-};
-
-/**
- * The PP_FileMapProtection values indicate the permissions requested for the
- * file mapping. These should be used in a uint32_t bitfield.
- */
-[assert_size(4)]
- enum PP_FileMapProtection {
- /** Requests read access to the mapped address. */
- PP_FILEMAPPROTECTION_READ = 1u << 0,
-
- /** Requests write access to the mapped address. */
- PP_FILEMAPPROTECTION_WRITE = 1u << 1
-};
-
-/**
- * The PP_FileMapFlags contain flag values for use with Map().
- */
-[assert_size(4)]
- enum PP_FileMapFlags {
- /**
- * Requests a shared mapping. If this flag is set, changes written to the
- * memory region will be reflected in the underlying file and will thus
- * eventually be visible to other processes which have opened the file. The
- * file may not actually be updated until Unmap() is called. This is only
- * valid if the PPB_FileIO resource was opened with write permission.
- */
- PP_FILEMAPFLAG_SHARED = 1u << 0,
-
- /**
- * Requests a copy-on-write mapping. If this flag is set, changes are not
- * written to the underlying file, but only in the memory of the process
- * (copy-on-write).
- */
- PP_FILEMAPFLAG_PRIVATE = 1u << 1,
-
- /**
- * Forces Map() to map the file contents at the provided |address|. If Map()
- * can not comply, Map() will fail.
- */
- PP_FILEMAPFLAG_FIXED = 1u << 2
-};
-
-/**
- * PPB_FileIO_Dev 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.
- */
-interface PPB_FileIO_Dev {
- /**
- * Map() maps the contents from an offset of the file into memory.
- *
- * @param[in] file_io A PP_Resource corresponding to a file.
- * @param[in] length The number of bytes to map.
- * @param[in] map_protection A bitfield containing values from
- * PP_FileMapProtection, indicating what memory operations should be permitted
- * on the mapped region.
- * @param[in] map_flags A bitfield containing values from
- * PP_FileMapFlags, providing options for the behavior of Map. If the region
- * is to be writeable, then exactly one of PP_FILEMAPFLAG_SHARED or
- * PP_FILEMAPFLAG_PRIVATE must be set.
- * @param[in] offset The offset into the file. Must be a multiple of the
- * Map page size as returned by GetMapPageSize.
- * @param[inout] address The value of |*address|, if non-NULL, will be used as
- * a hint to determine where in memory the file should be mapped. If the value
- * is NULL, the host operating system will choose |address|. Upon
- * Map() completing, |*address| will contain the actual memory location at
- * which the file was mapped. If the plugin provides a non-NULL |*address|, it
- * must be a multiple of the map page size as returned by GetMapPageSize().
- * @param[in] callback A PP_CompletionCallback to be called upon
- * completion of Map().
- *
- * @return An int32_t containing an error code from <code>pp_errors.h</code>.
- */
- int32_t Map([in] PP_Resource file_io,
- [in] int64_t length,
- [in] uint32_t map_protection,
- [in] uint32_t map_flags,
- [in] int64_t offset,
- [inout] mem_ptr_t address,
- [in] 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.
- * @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, mem_t address, int64_t length);
-
- /**
- * GetMapPageSize() returns the size of pages that Map() uses. Returns 0 on
- * failure.
- */
- [on_failure=0]
- int64_t GetMapPageSize(PP_Resource file_io);
-};
-
diff --git a/ppapi/api/ppb_file_mapping.idl b/ppapi/api/ppb_file_mapping.idl
new file mode 100644
index 0000000..2a10946
--- /dev/null
+++ b/ppapi/api/ppb_file_mapping.idl
@@ -0,0 +1,129 @@
+/* Copyright 2014 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+/**
+ * This file defines methods for mapping and unmapping files into and out of
+ * memory.
+ */
+
+label Chrome {
+ [channel=dev] M34 = 0.1
+};
+
+/**
+ * The PP_FileMapProtection values indicate the permissions requested for the
+ * file mapping. These should be used in a uint32_t bitfield.
+ */
+[assert_size(4)]
+enum PP_FileMapProtection {
+ /** Requests read access to the mapped address. */
+ PP_FILEMAPPROTECTION_READ = 1u << 0,
+
+ /** Requests write access to the mapped address. */
+ PP_FILEMAPPROTECTION_WRITE = 1u << 1
+};
+
+/**
+ * The PP_FileMapFlags contain flag values for use with Map().
+ */
+[assert_size(4)]
+enum PP_FileMapFlags {
+ /**
+ * Requests a shared mapping. If this flag is set, changes written to the
+ * memory region will be reflected in the underlying file and will thus
+ * eventually be visible to other processes which have opened the file. The
+ * file may not actually be updated until Unmap() is called. This is only
+ * valid if the PPB_FileIO resource was opened with write permission.
+ */
+ PP_FILEMAPFLAG_SHARED = 1u << 0,
+
+ /**
+ * Requests a copy-on-write mapping. If this flag is set, changes are not
+ * written to the underlying file, but only in the memory of the process
+ * (copy-on-write).
+ */
+ PP_FILEMAPFLAG_PRIVATE = 1u << 1,
+
+ /**
+ * Forces Map() to map the file contents at the provided |address|. If Map()
+ * can not comply, Map() will fail.
+ */
+ PP_FILEMAPFLAG_FIXED = 1u << 2
+};
+
+/**
+ * PPB_FileMapping contains functions for mapping and unmapping files into and
+ * out of memory.
+ */
+[singleton]
+interface PPB_FileMapping {
+ /**
+ * Map() maps the contents from an offset of the file into memory.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of
+ * a module.
+ * @param[in] file_io A <code>PPB_FileIO</code> <code>PP_Resource</code>
+ * corresponding to the file that should be mapped in to memory.
+ * @param[in] length The number of bytes to map.
+ * @param[in] map_protection A bitfield containing values from
+ * <code>PP_FileMapProtection</code>, indicating what memory operations
+ * should be permitted on the mapped region.
+ * @param[in] map_flags A bitfield containing values from
+ * <code>PP_FileMapFlags</code>, providing options for the behavior of Map.
+ * If the region is to be writeable, then exactly one of
+ * <code>PP_FILEMAPFLAG_SHARED</code> or <code>PP_FILEMAPFLAG_PRIVATE</code>
+ * must be set.
+ * @param[in] offset The offset into the file. Must be a multiple of the
+ * Map page size as returned by GetMapPageSize().
+ * @param[inout] address The value of <code>*address</code>, if non-NULL,
+ * will be used as a hint to determine where in memory the file should be
+ * mapped. If the value is NULL, the host operating system will choose
+ * <code>address</code>. Upon Map() completing, <code>*address</code> will
+ * contain the actual memory location at which the file was mapped. If the
+ * plugin provides a non-NULL <code>*address</code>, it must be a multiple of
+ * the map page size as returned by GetMapPageSize().
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Map().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ int32_t Map([in] PP_Instance instance,
+ [in] PP_Resource file_io,
+ [in] int64_t length,
+ [in] uint32_t map_protection,
+ [in] uint32_t map_flags,
+ [in] int64_t offset,
+ [inout] mem_ptr_t address,
+ [in] PP_CompletionCallback callback);
+
+ /**
+ * 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.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Unmap().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ int32_t Unmap([in] PP_Instance instance,
+ [in] mem_t address,
+ [in] int64_t length,
+ [in] PP_CompletionCallback callback);
+
+ /**
+ * GetMapPageSize() retrieves the size of pages that Map() uses.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance.
+ *
+ * @return The size of pages that Map() uses. Returns 0 on failure.
+ */
+ [on_failure=0]
+ int64_t GetMapPageSize(PP_Instance instance);
+};
+
diff --git a/ppapi/c/dev/ppb_file_io_dev.h b/ppapi/c/dev/ppb_file_io_dev.h
deleted file mode 100644
index a60d3a6..0000000
--- a/ppapi/c/dev/ppb_file_io_dev.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* From dev/ppb_file_io_dev.idl modified Thu Sep 19 10:07:03 2013. */
-
-#ifndef PPAPI_C_DEV_PPB_FILE_IO_DEV_H_
-#define PPAPI_C_DEV_PPB_FILE_IO_DEV_H_
-
-#include "ppapi/c/pp_completion_callback.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
-
-/**
- * @file
- * This file defines methods for use with a PPB_FileIO resource that may become
- * stable in the future. For now, they can be used only in plugins with DEV
- * permissions.
- */
-
-
-/**
- * @addtogroup Enums
- * @{
- */
-/**
- * The PP_FileMapProtection values indicate the permissions requested for the
- * file mapping. These should be used in a uint32_t bitfield.
- */
-typedef enum {
- /** Requests read access to the mapped address. */
- PP_FILEMAPPROTECTION_READ = 1u << 0,
- /** Requests write access to the mapped address. */
- PP_FILEMAPPROTECTION_WRITE = 1u << 1
-} PP_FileMapProtection;
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapProtection, 4);
-
-/**
- * The PP_FileMapFlags contain flag values for use with Map().
- */
-typedef enum {
- /**
- * Requests a shared mapping. If this flag is set, changes written to the
- * memory region will be reflected in the underlying file and will thus
- * eventually be visible to other processes which have opened the file. The
- * file may not actually be updated until Unmap() is called. This is only
- * valid if the PPB_FileIO resource was opened with write permission.
- */
- PP_FILEMAPFLAG_SHARED = 1u << 0,
- /**
- * Requests a copy-on-write mapping. If this flag is set, changes are not
- * written to the underlying file, but only in the memory of the process
- * (copy-on-write).
- */
- PP_FILEMAPFLAG_PRIVATE = 1u << 1,
- /**
- * Forces Map() to map the file contents at the provided |address|. If Map()
- * can not comply, Map() will fail.
- */
- PP_FILEMAPFLAG_FIXED = 1u << 2
-} PP_FileMapFlags;
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapFlags, 4);
-/**
- * @}
- */
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * PPB_FileIO_Dev 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 {
- /**
- * Map() maps the contents from an offset of the file into memory.
- *
- * @param[in] file_io A PP_Resource corresponding to a file.
- * @param[in] length The number of bytes to map.
- * @param[in] map_protection A bitfield containing values from
- * PP_FileMapProtection, indicating what memory operations should be permitted
- * on the mapped region.
- * @param[in] map_flags A bitfield containing values from
- * PP_FileMapFlags, providing options for the behavior of Map. If the region
- * is to be writeable, then exactly one of PP_FILEMAPFLAG_SHARED or
- * PP_FILEMAPFLAG_PRIVATE must be set.
- * @param[in] offset The offset into the file. Must be a multiple of the
- * Map page size as returned by GetMapPageSize.
- * @param[inout] address The value of |*address|, if non-NULL, will be used as
- * a hint to determine where in memory the file should be mapped. If the value
- * is NULL, the host operating system will choose |address|. Upon
- * Map() completing, |*address| will contain the actual memory location at
- * which the file was mapped. If the plugin provides a non-NULL |*address|, it
- * must be a multiple of the map page size as returned by GetMapPageSize().
- * @param[in] callback A PP_CompletionCallback to be called upon
- * completion of Map().
- *
- * @return An int32_t containing an error code from <code>pp_errors.h</code>.
- */
- int32_t (*Map)(PP_Resource file_io,
- int64_t length,
- uint32_t map_protection,
- uint32_t map_flags,
- int64_t offset,
- 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.
- * @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);
- /**
- * GetMapPageSize() returns the size of pages that Map() uses. Returns 0 on
- * failure.
- */
- int64_t (*GetMapPageSize)(PP_Resource file_io);
-};
-
-typedef struct PPB_FileIO_Dev_0_1 PPB_FileIO_Dev;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_FILE_IO_DEV_H_ */
-
diff --git a/ppapi/c/ppb_file_mapping.h b/ppapi/c/ppb_file_mapping.h
new file mode 100644
index 0000000..6887bfd
--- /dev/null
+++ b/ppapi/c/ppb_file_mapping.h
@@ -0,0 +1,147 @@
+/* Copyright 2014 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* From ppb_file_mapping.idl modified Wed Jan 22 12:25:44 2014. */
+
+#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_FILEMAPPING_INTERFACE_0_1 "PPB_FileMapping;0.1" /* dev */
+/**
+ * @file
+ * This file defines methods for mapping and unmapping files into and out of
+ * memory.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/**
+ * The PP_FileMapProtection values indicate the permissions requested for the
+ * file mapping. These should be used in a uint32_t bitfield.
+ */
+typedef enum {
+ /** Requests read access to the mapped address. */
+ PP_FILEMAPPROTECTION_READ = 1u << 0,
+ /** Requests write access to the mapped address. */
+ PP_FILEMAPPROTECTION_WRITE = 1u << 1
+} PP_FileMapProtection;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapProtection, 4);
+
+/**
+ * The PP_FileMapFlags contain flag values for use with Map().
+ */
+typedef enum {
+ /**
+ * Requests a shared mapping. If this flag is set, changes written to the
+ * memory region will be reflected in the underlying file and will thus
+ * eventually be visible to other processes which have opened the file. The
+ * file may not actually be updated until Unmap() is called. This is only
+ * valid if the PPB_FileIO resource was opened with write permission.
+ */
+ PP_FILEMAPFLAG_SHARED = 1u << 0,
+ /**
+ * Requests a copy-on-write mapping. If this flag is set, changes are not
+ * written to the underlying file, but only in the memory of the process
+ * (copy-on-write).
+ */
+ PP_FILEMAPFLAG_PRIVATE = 1u << 1,
+ /**
+ * Forces Map() to map the file contents at the provided |address|. If Map()
+ * can not comply, Map() will fail.
+ */
+ PP_FILEMAPFLAG_FIXED = 1u << 2
+} PP_FileMapFlags;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileMapFlags, 4);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * PPB_FileMapping contains functions for mapping and unmapping files into and
+ * out of memory.
+ */
+struct PPB_FileMapping_0_1 { /* dev */
+ /**
+ * Map() maps the contents from an offset of the file into memory.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of
+ * a module.
+ * @param[in] file_io A <code>PPB_FileIO</code> <code>PP_Resource</code>
+ * corresponding to the file that should be mapped in to memory.
+ * @param[in] length The number of bytes to map.
+ * @param[in] map_protection A bitfield containing values from
+ * <code>PP_FileMapProtection</code>, indicating what memory operations
+ * should be permitted on the mapped region.
+ * @param[in] map_flags A bitfield containing values from
+ * <code>PP_FileMapFlags</code>, providing options for the behavior of Map.
+ * If the region is to be writeable, then exactly one of
+ * <code>PP_FILEMAPFLAG_SHARED</code> or <code>PP_FILEMAPFLAG_PRIVATE</code>
+ * must be set.
+ * @param[in] offset The offset into the file. Must be a multiple of the
+ * Map page size as returned by GetMapPageSize().
+ * @param[inout] address The value of <code>*address</code>, if non-NULL,
+ * will be used as a hint to determine where in memory the file should be
+ * mapped. If the value is NULL, the host operating system will choose
+ * <code>address</code>. Upon Map() completing, <code>*address</code> will
+ * contain the actual memory location at which the file was mapped. If the
+ * plugin provides a non-NULL <code>*address</code>, it must be a multiple of
+ * the map page size as returned by GetMapPageSize().
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Map().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ 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,
+ struct PP_CompletionCallback callback);
+ /**
+ * 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.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Unmap().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ int32_t (*Unmap)(PP_Instance instance,
+ const void* address,
+ int64_t length,
+ struct PP_CompletionCallback callback);
+ /**
+ * GetMapPageSize() retrieves the size of pages that Map() uses.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance.
+ *
+ * @return The size of pages that Map() uses. Returns 0 on failure.
+ */
+ int64_t (*GetMapPageSize)(PP_Instance instance);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_FILE_MAPPING_H_ */
+
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index fdb9434..defd2ad 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -14,7 +14,6 @@
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
#include "ppapi/c/dev/ppb_device_ref_dev.h"
#include "ppapi/c/dev/ppb_file_chooser_dev.h"
-#include "ppapi/c/dev/ppb_file_io_dev.h"
#include "ppapi/c/dev/ppb_find_dev.h"
#include "ppapi/c/dev/ppb_font_dev.h"
#include "ppapi/c/dev/ppb_graphics_2d_dev.h"
@@ -49,6 +48,7 @@
#include "ppapi/c/ppb_console.h"
#include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_file_io.h"
+#include "ppapi/c/ppb_file_mapping.h"
#include "ppapi/c/ppb_file_ref.h"
#include "ppapi/c/ppb_file_system.h"
#include "ppapi/c/ppb_fullscreen.h"
@@ -143,6 +143,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Console_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Core_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_1_1;
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileMapping_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileRef_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileRef_1_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileRef_1_2;
@@ -186,7 +187,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_4;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_DeviceRef_Dev_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileChooser_Dev_0_5;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileChooser_Dev_0_6;
-static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_Dev_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Font_Dev_0_6;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_2;
@@ -414,6 +414,25 @@ static int32_t Pnacl_M25_PPB_FileIO_ReadToArray(PP_Resource file_io, int64_t off
/* End wrapper methods for PPB_FileIO_1_1 */
+/* Begin wrapper methods for PPB_FileMapping_0_1 */
+
+static int32_t Pnacl_M34_PPB_FileMapping_Map(PP_Instance instance, PP_Resource file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback* callback) {
+ const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_1.real_iface;
+ return iface->Map(instance, file_io, length, map_protection, map_flags, offset, address, *callback);
+}
+
+static int32_t Pnacl_M34_PPB_FileMapping_Unmap(PP_Instance file_io, const void* address, int64_t length, struct PP_CompletionCallback* callback) {
+ const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_1.real_iface;
+ return iface->Unmap(file_io, address, length, *callback);
+}
+
+static int64_t Pnacl_M34_PPB_FileMapping_GetMapPageSize(PP_Instance file_io) {
+ const struct PPB_FileMapping_0_1 *iface = Pnacl_WrapperInfo_PPB_FileMapping_0_1.real_iface;
+ return iface->GetMapPageSize(file_io);
+}
+
+/* End wrapper methods for PPB_FileMapping_0_1 */
+
/* Begin wrapper methods for PPB_FileRef_1_0 */
static PP_Resource Pnacl_M14_PPB_FileRef_Create(PP_Resource file_system, const char* path) {
@@ -1981,25 +2000,6 @@ static int32_t Pnacl_M19_PPB_FileChooser_Dev_Show(PP_Resource chooser, struct PP
/* End wrapper methods for PPB_FileChooser_Dev_0_6 */
-/* Begin wrapper methods for PPB_FileIO_Dev_0_1 */
-
-static int32_t Pnacl_M31_PPB_FileIO_Dev_Map(PP_Resource file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback* callback) {
- const struct PPB_FileIO_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_FileIO_Dev_0_1.real_iface;
- return iface->Map(file_io, length, map_protection, map_flags, offset, address, *callback);
-}
-
-static void Pnacl_M31_PPB_FileIO_Dev_Unmap(PP_Resource file_io, void* address, int64_t length) {
- const struct PPB_FileIO_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_FileIO_Dev_0_1.real_iface;
- iface->Unmap(file_io, address, length);
-}
-
-static int64_t Pnacl_M31_PPB_FileIO_Dev_GetMapPageSize(PP_Resource file_io) {
- const struct PPB_FileIO_Dev_0_1 *iface = Pnacl_WrapperInfo_PPB_FileIO_Dev_0_1.real_iface;
- return iface->GetMapPageSize(file_io);
-}
-
-/* End wrapper methods for PPB_FileIO_Dev_0_1 */
-
/* Not generating wrapper methods for PPB_Find_Dev_0_3 */
/* Begin wrapper methods for PPB_Font_Dev_0_6 */
@@ -4190,6 +4190,12 @@ static struct PPB_FileIO_1_1 Pnacl_Wrappers_PPB_FileIO_1_1 = {
.ReadToArray = (int32_t (*)(PP_Resource file_io, int64_t offset, int32_t max_read_length, struct PP_ArrayOutput* output, struct PP_CompletionCallback callback))&Pnacl_M25_PPB_FileIO_ReadToArray
};
+static struct PPB_FileMapping_0_1 Pnacl_Wrappers_PPB_FileMapping_0_1 = {
+ .Map = (int32_t (*)(PP_Instance instance, PP_Resource file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Map,
+ .Unmap = (int32_t (*)(PP_Instance file_io, const void* address, int64_t length, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_FileMapping_Unmap,
+ .GetMapPageSize = (int64_t (*)(PP_Instance file_io))&Pnacl_M34_PPB_FileMapping_GetMapPageSize
+};
+
static struct PPB_FileRef_1_0 Pnacl_Wrappers_PPB_FileRef_1_0 = {
.Create = (PP_Resource (*)(PP_Resource file_system, const char* path))&Pnacl_M14_PPB_FileRef_Create,
.IsFileRef = (PP_Bool (*)(PP_Resource resource))&Pnacl_M14_PPB_FileRef_IsFileRef,
@@ -4636,12 +4642,6 @@ static struct PPB_FileChooser_Dev_0_6 Pnacl_Wrappers_PPB_FileChooser_Dev_0_6 = {
.Show = (int32_t (*)(PP_Resource chooser, struct PP_ArrayOutput output, struct PP_CompletionCallback callback))&Pnacl_M19_PPB_FileChooser_Dev_Show
};
-static struct PPB_FileIO_Dev_0_1 Pnacl_Wrappers_PPB_FileIO_Dev_0_1 = {
- .Map = (int32_t (*)(PP_Resource file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void** address, struct PP_CompletionCallback callback))&Pnacl_M31_PPB_FileIO_Dev_Map,
- .Unmap = (void (*)(PP_Resource file_io, void* address, int64_t length))&Pnacl_M31_PPB_FileIO_Dev_Unmap,
- .GetMapPageSize = (int64_t (*)(PP_Resource file_io))&Pnacl_M31_PPB_FileIO_Dev_GetMapPageSize
-};
-
/* Not generating wrapper interface for PPB_Find_Dev_0_3 */
static struct PPB_Font_Dev_0_6 Pnacl_Wrappers_PPB_Font_Dev_0_6 = {
@@ -5255,6 +5255,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_1_1 = {
.real_iface = NULL
};
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileMapping_0_1 = {
+ .iface_macro = PPB_FILEMAPPING_INTERFACE_0_1,
+ .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_FileMapping_0_1,
+ .real_iface = NULL
+};
+
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileRef_1_0 = {
.iface_macro = PPB_FILEREF_INTERFACE_1_0,
.wrapped_iface = (void *) &Pnacl_Wrappers_PPB_FileRef_1_0,
@@ -5513,12 +5519,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileChooser_Dev_0_6 = {
.real_iface = NULL
};
-static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_Dev_0_1 = {
- .iface_macro = PPB_FILEIO_DEV_INTERFACE_0_1,
- .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_FileIO_Dev_0_1,
- .real_iface = NULL
-};
-
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Font_Dev_0_6 = {
.iface_macro = PPB_FONT_DEV_INTERFACE_0_6,
.wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Font_Dev_0_6,
@@ -5848,6 +5848,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_Core_1_0,
&Pnacl_WrapperInfo_PPB_FileIO_1_0,
&Pnacl_WrapperInfo_PPB_FileIO_1_1,
+ &Pnacl_WrapperInfo_PPB_FileMapping_0_1,
&Pnacl_WrapperInfo_PPB_FileRef_1_0,
&Pnacl_WrapperInfo_PPB_FileRef_1_1,
&Pnacl_WrapperInfo_PPB_FileRef_1_2,
@@ -5890,7 +5891,6 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_DeviceRef_Dev_0_1,
&Pnacl_WrapperInfo_PPB_FileChooser_Dev_0_5,
&Pnacl_WrapperInfo_PPB_FileChooser_Dev_0_6,
- &Pnacl_WrapperInfo_PPB_FileIO_Dev_0_1,
&Pnacl_WrapperInfo_PPB_Font_Dev_0_6,
&Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_1,
&Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_2,