| Index: base/android/jni_generator/sample_for_tests.cc
|
| diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc
|
| index 6707742ed01a7087be83cc9c38aa5fe77ce9931f..c5ae11241636fab677b0eab7f30387fbc6cdcc3e 100644
|
| --- a/base/android/jni_generator/sample_for_tests.cc
|
| +++ b/base/android/jni_generator/sample_for_tests.cc
|
| @@ -7,8 +7,10 @@
|
| #include "base/android/jni_android.h"
|
| #include "base/android/jni_string.h"
|
| #include "base/android/scoped_java_ref.h"
|
| -#include "jni/SampleForTests_jni.h"
|
| -
|
| +// Generated file for JNI bindings from C++ to Java @CalledByNative methods.
|
| +// Only to be included in .cc file.
|
| +// Name is based on the java file name: *.java -> jni/*_jni.h
|
| +#include "jni/SampleForTests_jni.h" // Generated by JNI.
|
|
|
| using base::android::AttachCurrentThread;
|
| using base::android::ScopedJavaLocalRef;
|
| @@ -26,6 +28,11 @@ CPPClass::CPPClass() {
|
| CPPClass::~CPPClass() {
|
| }
|
|
|
| +// static
|
| +bool CPPClass::RegisterJNI(JNIEnv* env) {
|
| + return RegisterNativesImpl(env); // Generated in SampleForTests_jni.h
|
| +}
|
| +
|
| void CPPClass::Destroy(JNIEnv* env, jobject obj) {
|
| delete this;
|
| }
|
|
|