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

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

Issue 526303003: mojo: java bindings rename Message subclasses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 6 years, 3 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/SimpleMessage.java
diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/SimpleMessage.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/SimpleMessage.java
deleted file mode 100644
index 93ae69605f8e9232a853cdcd4ad87ccb48bda3b3..0000000000000000000000000000000000000000
--- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/SimpleMessage.java
+++ /dev/null
@@ -1,71 +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}.
- */
-public final class SimpleMessage implements Message {
-
- /**
- * The data of the message.
- */
- private final ByteBuffer mBuffer;
-
- /**
- * The handles of the message.
- */
- private final List<? extends Handle> mHandle;
-
- /**
- * This message interpreted with headers.
- */
- private MessageWithHeader 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 SimpleMessage(ByteBuffer buffer, List<? extends Handle> handles) {
- assert buffer.isDirect();
- mBuffer = buffer;
- mHandle = handles;
- }
-
- /**
- * @see Message#getData()
- */
- @Override
- public ByteBuffer getData() {
- return mBuffer;
- }
-
- /**
- * @see Message#getHandles()
- */
- @Override
- public List<? extends Handle> getHandles() {
- return mHandle;
- }
-
- /**
- * @see Message#asMojoMessage()
- */
- @Override
- public MessageWithHeader asMojoMessage() {
- if (mWithHeader == null) {
- mWithHeader = new MessageWithHeader(this);
- }
- return mWithHeader;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698