OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.example.jni_generator; | 5 package org.chromium.example.jni_generator; |
6 | 6 |
| 7 import android.graphics.Rect; |
| 8 |
7 // This class serves as a reference test for the bindings generator, and as exam
ple documentation | 9 // This class serves as a reference test for the bindings generator, and as exam
ple documentation |
8 // for how to use the jni generator. | 10 // for how to use the jni generator. |
9 // The C++ counter-part is sample_for_tests.cc. | 11 // The C++ counter-part is sample_for_tests.cc. |
10 // jni_generator.gyp has a jni_generator_tests target that will: | 12 // jni_generator.gyp has a jni_generator_tests target that will: |
11 // * Generate a header file for the JNI bindings based on this file. | 13 // * Generate a header file for the JNI bindings based on this file. |
12 // * Compile sample_for_tests.cc using the generated header file. | 14 // * Compile sample_for_tests.cc using the generated header file. |
13 // * link a native executable to prove the generated header + cc file are self
-contained. | 15 // * link a native executable to prove the generated header + cc file are self
-contained. |
14 // All comments are informational only, and are ignored by the jni generator. | 16 // All comments are informational only, and are ignored by the jni generator. |
15 // | 17 // |
16 // This JNINamespace annotation indicates that all native methods should be | 18 // This JNINamespace annotation indicates that all native methods should be |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 162 } |
161 | 163 |
162 @NativeCall("InnerClass") | 164 @NativeCall("InnerClass") |
163 private static native int nativeInnerFunction(); | 165 private static native int nativeInnerFunction(); |
164 | 166 |
165 @NativeCall("InnerClass") | 167 @NativeCall("InnerClass") |
166 private static native String nativeInnerMethod(int nativeCPPClass); | 168 private static native String nativeInnerMethod(int nativeCPPClass); |
167 | 169 |
168 } | 170 } |
169 } | 171 } |
OLD | NEW |