Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2324)

Unified Diff: base/android/jni_android.h

Issue 8509019: Add JavaBoundObject (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/android/jni_android.cc » ('j') | base/android/jni_android.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
M-A Ruel 2011/11/11 13:31:13 In general we use the imperative (?) tense for ver
Steve Block 2011/11/11 16:05:20 Done.
+// 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
« no previous file with comments | « no previous file | base/android/jni_android.cc » ('j') | base/android/jni_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698