Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 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. | |
| 4 | |
| 5 | |
| 6 #ifndef BASE_ANDROID_JNI_GENERATOR_JNI_GENERATOR_HELPER_H_ | |
| 7 #define BASE_ANDROID_JNI_GENERATOR_JNI_GENERATOR_HELPER_H_ | |
| 8 | |
| 9 #include <jni.h> | |
| 10 | |
| 11 #include "base/android/jni_android.h" | |
| 12 #include "base/android/scoped_java_ref.h" | |
| 13 #include "base/basictypes.h" | |
| 14 #include "base/logging.h" | |
| 15 | |
| 16 // Project-specific macros used by the header files generated by | |
| 17 // jni_generator.py. Different projects can then specify their own | |
| 18 // implementation for this file. | |
| 19 #define DCHECK_NATIVE_PTR(native_ptr, method_name, ...) \ | |
|
dawalker
2013/12/13 21:41:08
One comment that Tatsuo made before, and I would a
dawalker
2013/12/13 21:57:58
I made this comment before I saw your comment on t
bulach
2014/01/07 09:23:54
Done.
| |
| 20 DCHECK(native_ptr) << method_name; | |
| 21 | |
| 22 #define DCHECK_CLAZZ(clazz, ...) \ | |
|
dawalker
2013/12/13 21:41:08
ditto
bulach
2014/01/07 09:23:54
Done.
| |
| 23 DCHECK(clazz); | |
| 24 | |
| 25 namespace jni_generator { | |
| 26 | |
| 27 inline void HandleRegistrationError(JNIEnv* env, jclass clazz, | |
| 28 const char* filename) { | |
| 29 LOG(ERROR) << "RegisterNatives failed in " << filename; | |
| 30 } | |
| 31 | |
| 32 inline void CheckException(JNIEnv* env) { | |
| 33 base::android::CheckException(env); | |
| 34 } | |
| 35 | |
| 36 } // namespace jni_generator | |
| 37 | |
| 38 using base::android::ScopedJavaLocalRef; | |
| 39 | |
| 40 #endif // BASE_ANDROID_JNI_GENERATOR_JNI_GENERATOR_HELPER_H_ | |
| OLD | NEW |