Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / mojo / android / system / src / org / chromium / mojo / system / UntypedHandleImpl.java
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.
4
5 package org.chromium.mojo.system;
6
7 import org.chromium.mojo.system.DataPipe.ConsumerHandle;
8 import org.chromium.mojo.system.DataPipe.ProducerHandle;
9
10 /**
11  * Implementation of {@link UntypedHandle}.
12  */
13 class UntypedHandleImpl extends HandleImpl implements UntypedHandle {
14
15     /**
16      * @see HandleImpl#HandleImpl(CoreImpl, int)
17      */
18     UntypedHandleImpl(CoreImpl core, int mojoHandle) {
19         super(core, mojoHandle);
20     }
21
22     /**
23      * @see org.chromium.mojo.system.UntypedHandle#toMessagePipeHandle()
24      */
25     @Override
26     public MessagePipeHandle toMessagePipeHandle() {
27         return new MessagePipeHandleImpl(this);
28     }
29
30     /**
31      * @see org.chromium.mojo.system.UntypedHandle#toDataPipeConsumerHandle()
32      */
33     @Override
34     public ConsumerHandle toDataPipeConsumerHandle() {
35         return new DataPipeConsumerHandleImpl(this);
36     }
37
38     /**
39      * @see org.chromium.mojo.system.UntypedHandle#toDataPipeProducerHandle()
40      */
41     @Override
42     public ProducerHandle toDataPipeProducerHandle() {
43         return new DataPipeProducerHandleImpl(this);
44     }
45
46     /**
47      * @see org.chromium.mojo.system.UntypedHandle#toSharedBufferHandle()
48      */
49     @Override
50     public SharedBufferHandle toSharedBufferHandle() {
51         return new SharedBufferHandleImpl(this);
52     }
53
54 }