OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_ANDROID_JNI_ANDROID_H_ | 5 #ifndef BASE_ANDROID_JNI_ANDROID_H_ |
6 #define BASE_ANDROID_JNI_ANDROID_H_ | 6 #define BASE_ANDROID_JNI_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Returns the application context assigned by InitApplicationContext(). | 30 // Returns the application context assigned by InitApplicationContext(). |
31 jobject GetApplicationContext(); | 31 jobject GetApplicationContext(); |
32 | 32 |
33 // Get the method ID for a method. Will clear the pending Java | 33 // Get the method ID for a method. Will clear the pending Java |
34 // exception and return 0 if the method is not found. | 34 // exception and return 0 if the method is not found. |
35 jmethodID GetMethodID(JNIEnv* env, | 35 jmethodID GetMethodID(JNIEnv* env, |
36 jclass clazz, | 36 jclass clazz, |
37 const char* const method, | 37 const char* const method, |
38 const char* const jni_signature); | 38 const char* const jni_signature); |
39 | 39 |
| 40 // Get the method ID for a class static method. Will clear the pending Java |
| 41 // exception and return 0 if the method is not found. |
| 42 jmethodID GetStaticMethodID(JNIEnv* env, |
| 43 jclass clazz, |
| 44 const char* const method, |
| 45 const char* const jni_signature); |
| 46 |
40 // Returns true if an exception is pending in the provided JNIEnv*. | 47 // Returns true if an exception is pending in the provided JNIEnv*. |
41 // If an exception is pending, it is printed. | 48 // If an exception is pending, it is printed. |
42 bool CheckException(JNIEnv* env); | 49 bool CheckException(JNIEnv* env); |
43 | 50 |
44 } // namespace android | 51 } // namespace android |
45 } // namespace base | 52 } // namespace base |
46 | 53 |
47 #endif // BASE_ANDROID_JNI_ANDROID_H_ | 54 #endif // BASE_ANDROID_JNI_ANDROID_H_ |
OLD | NEW |