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

Unified Diff: mojo/public/java/src/org/chromium/mojo/system/MessagePipeHandle.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/public/java/src/org/chromium/mojo/system/MessagePipeHandle.java
diff --git a/mojo/public/java/src/org/chromium/mojo/system/MessagePipeHandle.java b/mojo/public/java/src/org/chromium/mojo/system/MessagePipeHandle.java
index cfb032756e93b91a6e57dce93f46f7e48365f83d..60ac6825b42e40350750d595dbbed4dbc6f75a9a 100644
--- a/mojo/public/java/src/org/chromium/mojo/system/MessagePipeHandle.java
+++ b/mojo/public/java/src/org/chromium/mojo/system/MessagePipeHandle.java
@@ -12,6 +12,51 @@ import java.util.List;
* can contain plain data and/or Mojo handles.
*/
public interface MessagePipeHandle extends Handle {
+
+ /**
+ * Flags for the message pipe creation operation.
+ */
+ public static class CreateFlags extends Flags<CreateFlags> {
+ private static final int FLAG_NONE = 0;
+
+ /**
+ * Immutable flag with not bit set.
+ */
+ public static final CreateFlags NONE = CreateFlags.none().immutable();
+
+ /**
+ * Dedicated constructor.
+ *
+ * @param flags initial value of the flags.
+ */
+ protected CreateFlags(int flags) {
+ super(flags);
+ }
+
+ /**
+ * @return flags with no bit set.
+ */
+ public static CreateFlags none() {
+ return new CreateFlags(FLAG_NONE);
+ }
+
+ }
+
+ /**
+ * Used to specify creation parameters for a message pipe to |Core#createMessagePipe()|.
+ */
+ public static class CreateOptions {
+ private CreateFlags mFlags = CreateFlags.NONE;
+
+ /**
+ * @return the flags
+ */
+ public CreateFlags getFlags() {
+ return mFlags;
+ }
+
+ }
+
/**
* Flags for the write operations on MessagePipeHandle .
*/

Powered by Google App Engine
This is Rietveld 408576698