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

Unified Diff: mojo/public/java/bindings/src/org/chromium/mojo/bindings/Message.java

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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/bindings/src/org/chromium/mojo/bindings/Message.java
diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Message.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Message.java
deleted file mode 100644
index 0d270cc6dddc9c137edfdb28f1e93bd2d35e6ecf..0000000000000000000000000000000000000000
--- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Message.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// 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.bindings;
-
-import org.chromium.mojo.system.Handle;
-import org.chromium.mojo.system.MessagePipeHandle;
-
-import java.nio.ByteBuffer;
-import java.util.List;
-
-/**
- * A raw message to be sent/received from a {@link MessagePipeHandle}. Note that this can contain
- * any data, not necessarily a Mojo message with a proper header. See also {@link ServiceMessage}.
- */
-public class Message {
-
- /**
- * The data of the message.
- */
- private final ByteBuffer mBuffer;
-
- /**
- * The handles of the message.
- */
- private final List<? extends Handle> mHandle;
-
- /**
- * This message interpreted as a message for a mojo service with an appropriate header.
- */
- private ServiceMessage mWithHeader = null;
-
- /**
- * Constructor.
- *
- * @param buffer The buffer containing the bytes to send. This must be a direct buffer.
- * @param handles The list of handles to send.
- */
- public Message(ByteBuffer buffer, List<? extends Handle> handles) {
- assert buffer.isDirect();
- mBuffer = buffer;
- mHandle = handles;
- }
-
- /**
- * The data of the message.
- */
- public ByteBuffer getData() {
- return mBuffer;
- }
-
- /**
- * The handles of the message.
- */
- public List<? extends Handle> getHandles() {
- return mHandle;
- }
-
- /**
- * Returns the message interpreted as a message for a mojo service.
- */
- public ServiceMessage asServiceMessage() {
- if (mWithHeader == null) {
- mWithHeader = new ServiceMessage(this);
- }
- return mWithHeader;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698