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

Unified Diff: mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java

Issue 397493007: Add support for MojoCreateMessagePipeOptions struct to Java bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 6 years, 5 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: mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java
diff --git a/mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java b/mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java
index 6c0475e82664e939ac3cd1d51682c74bc8ec9fec..570d3bda86733f2541f03727d4f680859cb399f6 100644
--- a/mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java
+++ b/mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java
@@ -109,11 +109,18 @@ public class CoreImpl implements Core, AsyncWaiter {
}
/**
- * @see Core#createMessagePipe()
+ * @see Core#createMessagePipe(MessagePipeHandle.CreateOptions)
*/
@Override
- public Pair<MessagePipeHandle, MessagePipeHandle> createMessagePipe() {
- NativeCreationResult result = nativeCreateMessagePipe();
+ public Pair<MessagePipeHandle, MessagePipeHandle> createMessagePipe(
+ MessagePipeHandle.CreateOptions options) {
+ ByteBuffer optionsBuffer = null;
+ if (options != null) {
+ optionsBuffer = allocateDirectBuffer(8);
+ optionsBuffer.putInt(0, 8);
+ optionsBuffer.putInt(4, options.getFlags().getFlags());
+ }
+ NativeCreationResult result = nativeCreateMessagePipe(optionsBuffer);
if (result.getMojoResult() != MojoResult.OK) {
throw new MojoException(result.getMojoResult());
}
@@ -611,7 +618,7 @@ public class CoreImpl implements Core, AsyncWaiter {
private native int nativeWaitMany(ByteBuffer buffer, long deadline);
- private native NativeCreationResult nativeCreateMessagePipe();
+ private native NativeCreationResult nativeCreateMessagePipe(ByteBuffer optionsBuffer);
private native NativeCreationResult nativeCreateDataPipe(ByteBuffer optionsBuffer);
« no previous file with comments | « mojo/android/system/core_impl.cc ('k') | mojo/bindings/java/src/org/chromium/mojo/bindings/ExecutorFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698