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

Side by Side Diff: base/android/jni_android.h

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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 unified diff | Download patch
OLDNEW
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 <string> 11 #include <string>
12 12
13 #include "base/android/scoped_java_ref.h" 13 #include "base/android/scoped_java_ref.h"
14 #include "base/atomicops.h" 14 #include "base/atomicops.h"
15 #include "base/base_export.h" 15 #include "base/base_export.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 17
18 namespace base { 18 namespace base {
19 namespace android { 19 namespace android {
20 20
21 // Used to mark symbols to be exported in a shared library's symbol table. 21 // Used to mark symbols to be exported in a shared library's symbol table.
22 #define JNI_EXPORT __attribute__ ((visibility("default"))) 22 #define JNI_EXPORT __attribute__ ((visibility("default")))
23 23
24 // Used to disable manual JNI registration in binaries that prefer to use native
25 // JNI exports for startup performance. This is not compatible with the crazy
26 // linker and so defaults to off. Call DisableManualJniRegistration at the very
27 // beginning of JNI_OnLoad to use this.
28 BASE_EXPORT bool IsManualJniRegistrationDisabled();
29 BASE_EXPORT void DisableManualJniRegistration();
30
31 // Contains the registration method information for initializing JNI bindings. 24 // Contains the registration method information for initializing JNI bindings.
32 struct RegistrationMethod { 25 struct RegistrationMethod {
33 const char* name; 26 const char* name;
34 bool (*func)(JNIEnv* env); 27 bool (*func)(JNIEnv* env);
35 }; 28 };
36 29
37 // Attaches the current thread to the VM (if necessary) and return the JNIEnv*. 30 // Attaches the current thread to the VM (if necessary) and return the JNIEnv*.
38 BASE_EXPORT JNIEnv* AttachCurrentThread(); 31 BASE_EXPORT JNIEnv* AttachCurrentThread();
39 32
40 // Same to AttachCurrentThread except that thread name will be set to 33 // Same to AttachCurrentThread except that thread name will be set to
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // and returns true. 120 // and returns true.
128 BASE_EXPORT bool ClearException(JNIEnv* env); 121 BASE_EXPORT bool ClearException(JNIEnv* env);
129 122
130 // This function will call CHECK() macro if there's any pending exception. 123 // This function will call CHECK() macro if there's any pending exception.
131 BASE_EXPORT void CheckException(JNIEnv* env); 124 BASE_EXPORT void CheckException(JNIEnv* env);
132 125
133 } // namespace android 126 } // namespace android
134 } // namespace base 127 } // namespace base
135 128
136 #endif // BASE_ANDROID_JNI_ANDROID_H_ 129 #endif // BASE_ANDROID_JNI_ANDROID_H_
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/library_loader/Linker.java ('k') | base/android/jni_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698