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

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

Issue 228723002: Java API for mojo system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding empty file to force creation. Created 6 years, 8 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/DataPipeProducerHandleImpl.java
diff --git a/mojo/android/system/src/org/chromium/mojo/system/DataPipeProducerHandleImpl.java b/mojo/android/system/src/org/chromium/mojo/system/DataPipeProducerHandleImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..d6e00dfed5e1f9ec84805a2f8f368dd213094f47
--- /dev/null
+++ b/mojo/android/system/src/org/chromium/mojo/system/DataPipeProducerHandleImpl.java
@@ -0,0 +1,55 @@
+// 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.
+
+package org.chromium.mojo.system;
+
+import org.chromium.mojo.system.DataPipe.ProducerHandle;
+import org.chromium.mojo.system.DataPipe.WriteFlags;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Implementation of {@link ProducerHandle}.
+ */
+class DataPipeProducerHandleImpl extends HandleImpl implements ProducerHandle {
+
+ /**
+ * @see HandleImpl#HandleImpl(CoreImpl, int)
+ */
+ DataPipeProducerHandleImpl(CoreImpl core, int mojoHandle) {
+ super(core, mojoHandle);
+ }
+
+ /**
+ * @see HandleImpl#HandleImpl(UntypedHandleImpl)
+ */
+ DataPipeProducerHandleImpl(UntypedHandleImpl handle) {
+ super(handle);
+ }
+
+ /**
+ * @see DataPipe.ProducerHandle#writeData(ByteBuffer, WriteFlags)
+ */
+ @Override
+ public int writeData(ByteBuffer elements, WriteFlags flags) {
+ return mCore.writeData(this, elements, flags);
+ }
+
+ /**
+ * @see DataPipe.ProducerHandle#beginWriteData(int, WriteFlags)
+ */
+ @Override
+ public ByteBuffer beginWriteData(int numBytes, WriteFlags flags) {
+ return mCore.beginWriteData(this, numBytes, flags);
+ }
+
+ /**
+ * @see DataPipe.ProducerHandle#endWriteData(int)
+ */
+ @Override
+ public void endWriteData(int numBytesWritten) {
+ mCore.endWriteData(this, numBytesWritten);
+ }
+
+}

Powered by Google App Engine
This is Rietveld 408576698