| Index: base/android/jni_android.h
|
| diff --git a/base/android/jni_android.h b/base/android/jni_android.h
|
| index 66b3134e35d2b271760c2d9a19952c6affb15b97..7ddcdb763d2b030a914e7ad987d7b53d50768602 100644
|
| --- a/base/android/jni_android.h
|
| +++ b/base/android/jni_android.h
|
| @@ -8,6 +8,8 @@
|
| #include <jni.h>
|
| #include <sys/types.h>
|
|
|
| +#include "base/android/scoped_java_ref.h"
|
| +
|
| namespace base {
|
| namespace android {
|
|
|
| @@ -30,6 +32,15 @@ void InitApplicationContext(jobject context);
|
| // Returns the application context assigned by InitApplicationContext().
|
| jobject GetApplicationContext();
|
|
|
| +// Get the method ID for a method, from the class name. Will clear the pending
|
| +// Java exception and return 0 if the method is not found. Note that
|
| +// GetMethodID() below avoids a class lookup, so should be used in preference
|
| +// when possible.
|
| +jmethodID GetMethodIDFromClassName(JNIEnv* env,
|
| + const char* const class_name,
|
| + const char* const method,
|
| + const char* const jni_signature);
|
| +
|
| // Get the method ID for a method. Will clear the pending Java
|
| // exception and return 0 if the method is not found.
|
| jmethodID GetMethodID(JNIEnv* env,
|
| @@ -44,8 +55,15 @@ jmethodID GetStaticMethodID(JNIEnv* env,
|
| const char* const method,
|
| const char* const jni_signature);
|
|
|
| +// Get the field ID for a class field. Will clear the pending Java
|
| +// exception and return 0 if the field is not found.
|
| +jfieldID GetFieldID(JNIEnv* env,
|
| + jclass clazz,
|
| + const char* const field,
|
| + const char* const jni_signature);
|
| +
|
| // Returns true if an exception is pending in the provided JNIEnv*.
|
| -// If an exception is pending, it is printed.
|
| +// If an exception is pending, it is printed and cleared.
|
| bool CheckException(JNIEnv* env);
|
|
|
| } // namespace android
|
|
|