Index: mojo/public/cpp/system/platform_handle.h |
diff --git a/mojo/public/cpp/system/platform_handle.h b/mojo/public/cpp/system/platform_handle.h |
index 801264efce650c69d39f798b4f4b37cd5f08e296..c9789be6f2703cf4c34c6f835cd74d7f7d030c43 100644 |
--- a/mojo/public/cpp/system/platform_handle.h |
+++ b/mojo/public/cpp/system/platform_handle.h |
@@ -24,6 +24,10 @@ |
#include "mojo/public/cpp/system/handle.h" |
#include "mojo/public/cpp/system/system_export.h" |
+#if defined(OS_ANDROID) |
+#include "base/android/scoped_java_ref.h" |
+#endif |
+ |
#if defined(OS_WIN) |
#include <windows.h> |
#endif |
@@ -42,6 +46,12 @@ const MojoPlatformHandleType kPlatformSharedBufferHandleType = |
MOJO_PLATFORM_HANDLE_TYPE_FILE_DESCRIPTOR; |
#endif // defined(OS_MACOSX) && !defined(OS_IOS) |
+#if defined(OS_ANDROID) |
+const MojoPlatformHandleType kPlatformParcelableType = |
+ MOJO_PLATFORM_HANDLE_TYPE_PARCELABLE; |
+ |
+#endif // defined(OS_ANDROID) |
+ |
#elif defined(OS_WIN) |
const MojoPlatformHandleType kPlatformFileHandleType = |
MOJO_PLATFORM_HANDLE_TYPE_WINDOWS_HANDLE; |
@@ -87,6 +97,15 @@ MOJO_CPP_SYSTEM_EXPORT MojoResult UnwrapMachPort(ScopedHandle handle, |
mach_port_t* port); |
#endif // defined(OS_MACOSX) && !defined(OS_IOS) |
+#if defined(OS_ANDROID) |
+MOJO_CPP_SYSTEM_EXPORT ScopedHandle |
+WrapParcelable(base::android::ScopedJavaLocalRef<jobject> parcelable); |
+ |
+MOJO_CPP_SYSTEM_EXPORT MojoResult |
+UnwrapParcelable(ScopedHandle handle, |
+ base::android::ScopedJavaLocalRef<jobject>* parcelable); |
+#endif |
+ |
} // namespace mojo |
#endif // MOJO_PUBLIC_CPP_SYSTEM_PLATFORM_HANDLE_H_ |