Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 | 13 |
| 14 // Used to mark symbols to be exported in a shared library's symbol table. | |
| 15 #define JNI_EXPORT __attribute__ ((visibility("default"))) | |
|
John Grabowski
2012/04/19 18:55:27
I believe this is in http://chromiumcodereview.app
Ted C
2012/04/19 23:21:07
Done.
| |
| 16 | |
| 14 namespace base { | 17 namespace base { |
| 15 namespace android { | 18 namespace android { |
| 16 | 19 |
| 17 // Attach the current thread to the VM (if necessary) and return the JNIEnv*. | 20 // Attach the current thread to the VM (if necessary) and return the JNIEnv*. |
| 18 JNIEnv* AttachCurrentThread(); | 21 JNIEnv* AttachCurrentThread(); |
| 19 | 22 |
| 20 // Detach the current thread from VM if it is attached. | 23 // Detach the current thread from VM if it is attached. |
| 21 void DetachFromVM(); | 24 void DetachFromVM(); |
| 22 | 25 |
| 23 // Initializes the global JVM. It is not necessarily called before | 26 // Initializes the global JVM. It is not necessarily called before |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 // and returns true. | 127 // and returns true. |
| 125 bool ClearException(JNIEnv* env); | 128 bool ClearException(JNIEnv* env); |
| 126 | 129 |
| 127 // This function will call CHECK() macro if there's any pending exception. | 130 // This function will call CHECK() macro if there's any pending exception. |
| 128 void CheckException(JNIEnv* env); | 131 void CheckException(JNIEnv* env); |
| 129 | 132 |
| 130 } // namespace android | 133 } // namespace android |
| 131 } // namespace base | 134 } // namespace base |
| 132 | 135 |
| 133 #endif // BASE_ANDROID_JNI_ANDROID_H_ | 136 #endif // BASE_ANDROID_JNI_ANDROID_H_ |
| OLD | NEW |