Chromium Code Reviews| Index: base/android/jni_android.h |
| diff --git a/base/android/jni_android.h b/base/android/jni_android.h |
| index 462173f85d38cf48b62e466ebeb97e1b0a6ea006..25e868500eefe963e268ca3c45b19a1fb761061c 100644 |
| --- a/base/android/jni_android.h |
| +++ b/base/android/jni_android.h |
| @@ -30,19 +30,13 @@ void InitApplicationContext(jobject context); |
| // Returns the application context assigned by InitApplicationContext(). |
| jobject GetApplicationContext(); |
| -// Wraps a method ID. |
| -class MethodID { |
| - public: |
| - jmethodID id() { return id_; } |
| - protected: |
| - // Gets the method ID from the class name. Clears the pending Java exception |
| - // and returns NULL if the method is not found. Note that GetMethodID() below |
| - // avoids a class lookup, so should be used in preference when possible. |
| - MethodID(JNIEnv* env, const char* class_name, const char* method, |
| - const char* jni_signature); |
| - private: |
| - jmethodID id_; |
| -}; |
| +// Gets the method ID from the class name. Clears the pending Java exception |
| +// and returns NULL 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, |
|
M-A Ruel
2011/12/01 14:36:03
I'm taking issue about the design now. Here's the
|
| + const char* class_name, |
| + const char* method, |
| + const char* jni_signature); |
| // Get the method ID for a method. Will clear the pending Java |
| // exception and return 0 if the method is not found. |