1 // Copyright (c) 2013 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.
5 #ifndef BASE_ANDROID_JNI_GENERATOR_SAMPLE_FOR_TESTS_H_
6 #define BASE_ANDROID_JNI_GENERATOR_SAMPLE_FOR_TESTS_H_
12 #include "base/android/jni_android.h"
13 #include "base/basictypes.h"
18 // This file is used to:
19 // - document the best practices and guidelines on JNI usage.
20 // - ensure sample_for_tests_jni.h compiles and the functions declared in it
23 // All methods are called directly from Java. See more documentation in
24 // SampleForTests.java.
32 jdouble
MethodOtherP0(JNIEnv
* env
, jobject obj
);
35 void Destroy(JNIEnv
* env
, jobject obj
);
37 jint
Method(JNIEnv
* env
, jobject obj
);
39 void AddStructB(JNIEnv
* env
, jobject obj
, jobject structb
);
41 void IterateAndDoSomethingWithStructB(JNIEnv
* env
, jobject obj
);
43 base::android::ScopedJavaLocalRef
<jstring
> ReturnAString(
44 JNIEnv
* env
, jobject obj
);
47 std::map
<long, std::string
> map_
;
49 DISALLOW_COPY_AND_ASSIGN(CPPClass
);
52 } // namespace android
55 #endif // BASE_ANDROID_JNI_GENERATOR_SAMPLE_FOR_TESTS_H_