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 #include "mojo/android/javatests/validation_test_util.h" | 5 #include "mojo/android/javatests/validation_test_util.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/test/test_support_android.h" | 10 #include "base/test/test_support_android.h" |
11 #include "jni/ValidationTestUtil_jni.h" | 11 #include "jni/ValidationTestUtil_jni.h" |
12 #include "mojo/public/cpp/bindings/tests/validation_test_input_parser.h" | 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/tests/validation_test_in
put_parser.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace android { | 15 namespace android { |
16 | 16 |
17 bool RegisterValidationTestUtil(JNIEnv* env) { | 17 bool RegisterValidationTestUtil(JNIEnv* env) { |
18 return RegisterNativesImpl(env); | 18 return RegisterNativesImpl(env); |
19 } | 19 } |
20 | 20 |
21 ScopedJavaLocalRef<jobject> ParseData( | 21 ScopedJavaLocalRef<jobject> ParseData( |
22 JNIEnv* env, | 22 JNIEnv* env, |
(...skipping 16 matching lines...) Expand all Loading... |
39 DCHECK(!data.size()); | 39 DCHECK(!data.size()); |
40 data_ptr = &data; | 40 data_ptr = &data; |
41 } | 41 } |
42 jobject byte_buffer = | 42 jobject byte_buffer = |
43 env->NewDirectByteBuffer(data_ptr, data.size()); | 43 env->NewDirectByteBuffer(data_ptr, data.size()); |
44 return Java_ValidationTestUtil_buildData(env, byte_buffer, num_handles, NULL); | 44 return Java_ValidationTestUtil_buildData(env, byte_buffer, num_handles, NULL); |
45 } | 45 } |
46 | 46 |
47 } // namespace android | 47 } // namespace android |
48 } // namespace mojo | 48 } // namespace mojo |
OLD | NEW |