summaryrefslogtreecommitdiffstats
path: root/content/common/pepper_file_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/pepper_file_util.cc')
-rw-r--r--content/common/pepper_file_util.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/content/common/pepper_file_util.cc b/content/common/pepper_file_util.cc
index fea5ef2..be253c1 100644
--- a/content/common/pepper_file_util.cc
+++ b/content/common/pepper_file_util.cc
@@ -20,4 +20,26 @@ storage::FileSystemType PepperFileSystemTypeToFileSystemType(
}
}
+base::PlatformFile PlatformFileFromSharedMemoryHandle(
+ const base::SharedMemoryHandle& shm_handle) {
+#if defined(OS_WIN)
+ return shm_handle;
+#elif defined(OS_POSIX)
+ return shm_handle.fd;
+#else
+#error Platform not supported.
+#endif
+}
+
+int IntegerFromSyncSocketHandle(
+ const base::SyncSocket::Handle& socket_handle) {
+#if defined(OS_WIN)
+ return reinterpret_cast<int>(socket_handle);
+#elif defined(OS_POSIX)
+ return socket_handle;
+#else
+#error Platform not supported.
+#endif
+}
+
} // namespace content