OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.mojo.bindings; | 5 package org.chromium.mojo.bindings; |
6 | 6 |
7 import org.chromium.base.CalledByNative; | 7 import org.chromium.base.annotations.CalledByNative; |
8 import org.chromium.base.JNINamespace; | 8 import org.chromium.base.annotations.JNINamespace; |
9 | 9 |
10 import java.nio.ByteBuffer; | 10 import java.nio.ByteBuffer; |
11 import java.nio.ByteOrder; | 11 import java.nio.ByteOrder; |
12 | 12 |
13 /** | 13 /** |
14 * Utility class for testing message validation. The file format used to describ
e a message is | 14 * Utility class for testing message validation. The file format used to describ
e a message is |
15 * described in The format is described in | 15 * described in The format is described in |
16 * mojo/public/cpp/bindings/tests/validation_test_input_parser.h | 16 * mojo/public/cpp/bindings/tests/validation_test_input_parser.h |
17 */ | 17 */ |
18 @JNINamespace("mojo::android") | 18 @JNINamespace("mojo::android") |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 ByteBuffer copiedData = null; | 59 ByteBuffer copiedData = null; |
60 if (data != null) { | 60 if (data != null) { |
61 copiedData = ByteBuffer.allocateDirect(data.limit()); | 61 copiedData = ByteBuffer.allocateDirect(data.limit()); |
62 copiedData.order(ByteOrder.LITTLE_ENDIAN); | 62 copiedData.order(ByteOrder.LITTLE_ENDIAN); |
63 copiedData.put(data); | 63 copiedData.put(data); |
64 copiedData.flip(); | 64 copiedData.flip(); |
65 } | 65 } |
66 return new Data(copiedData, handlesCount, errorMessage); | 66 return new Data(copiedData, handlesCount, errorMessage); |
67 } | 67 } |
68 } | 68 } |
OLD | NEW |