1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.mojo.system.impl;
7 import org.chromium.mojo.system.DataPipe.ConsumerHandle;
8 import org.chromium.mojo.system.DataPipe.ProducerHandle;
9 import org.chromium.mojo.system.MessagePipeHandle;
10 import org.chromium.mojo.system.SharedBufferHandle;
11 import org.chromium.mojo.system.UntypedHandle;
14 * Implementation of {@link UntypedHandle}.
16 class UntypedHandleImpl extends HandleBase implements UntypedHandle {
19 * @see HandleBase#HandleBase(CoreImpl, int)
21 UntypedHandleImpl(CoreImpl core, int mojoHandle) {
22 super(core, mojoHandle);
26 * @see HandleBase#HandleBase(HandleBase)
28 UntypedHandleImpl(HandleBase handle) {
33 * @see org.chromium.mojo.system.UntypedHandle#pass()
36 public UntypedHandle pass() {
37 return new UntypedHandleImpl(this);
41 * @see org.chromium.mojo.system.UntypedHandle#toMessagePipeHandle()
44 public MessagePipeHandle toMessagePipeHandle() {
45 return new MessagePipeHandleImpl(this);
49 * @see org.chromium.mojo.system.UntypedHandle#toDataPipeConsumerHandle()
52 public ConsumerHandle toDataPipeConsumerHandle() {
53 return new DataPipeConsumerHandleImpl(this);
57 * @see org.chromium.mojo.system.UntypedHandle#toDataPipeProducerHandle()
60 public ProducerHandle toDataPipeProducerHandle() {
61 return new DataPipeProducerHandleImpl(this);
65 * @see org.chromium.mojo.system.UntypedHandle#toSharedBufferHandle()
68 public SharedBufferHandle toSharedBufferHandle() {
69 return new SharedBufferHandleImpl(this);