OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ | 5 #ifndef BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ |
6 #define BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ | 6 #define BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 PROCESS_BROWSER = 1, | 21 PROCESS_BROWSER = 1, |
22 // Shared library is running in child process. | 22 // Shared library is running in child process. |
23 PROCESS_CHILD = 2, | 23 PROCESS_CHILD = 2, |
24 // Shared library is running in the app that uses webview. | 24 // Shared library is running in the app that uses webview. |
25 PROCESS_WEBVIEW = 3, | 25 PROCESS_WEBVIEW = 3, |
26 // Shared library is running in child process as part of webview. | 26 // Shared library is running in child process as part of webview. |
27 PROCESS_WEBVIEW_CHILD = 4, | 27 PROCESS_WEBVIEW_CHILD = 4, |
28 }; | 28 }; |
29 | 29 |
30 // Record any pending renderer histogram value as a histogram. Pending values | 30 // Record any pending renderer histogram value as a histogram. Pending values |
31 // are set by RegisterChromiumAndroidLinkerRendererHistogram. | 31 // are set by RegisterChromiumAndroidLinkerRendererHistogram and |
32 BASE_EXPORT void RecordChromiumAndroidLinkerRendererHistogram(); | 32 // RegisterLibraryPreloaderRendererHistogram. |
| 33 BASE_EXPORT void RecordChromiumAndroidLibraryLoaderRendererHistogram(); |
33 | 34 |
34 // Registers the callbacks that allows the entry point of the library to be | 35 // Registers the callbacks that allows the entry point of the library to be |
35 // exposed to the calling java code. This handles only registering the | 36 // exposed to the calling java code. This handles only registering the |
36 // the callbacks needed by the loader. Any application specific JNI bindings | 37 // the callbacks needed by the loader. Any application specific JNI bindings |
37 // should happen once the native library has fully loaded, either in the library | 38 // should happen once the native library has fully loaded, either in the library |
38 // loaded hook function or later. | 39 // loaded hook function or later. |
39 BASE_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env); | 40 BASE_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env); |
40 | 41 |
41 // Typedef for hook function to be called (indirectly from Java) once the | 42 // Typedef for hook function to be called (indirectly from Java) once the |
42 // libraries are loaded. The hook function should register the JNI bindings | 43 // libraries are loaded. The hook function should register the JNI bindings |
(...skipping 24 matching lines...) Expand all Loading... |
67 BASE_EXPORT LibraryProcessType GetLibraryProcessType(JNIEnv* env); | 68 BASE_EXPORT LibraryProcessType GetLibraryProcessType(JNIEnv* env); |
68 | 69 |
69 // Initialize AtExitManager, this must be done at the begining of loading | 70 // Initialize AtExitManager, this must be done at the begining of loading |
70 // shared library. | 71 // shared library. |
71 void InitAtExitManager(); | 72 void InitAtExitManager(); |
72 | 73 |
73 } // namespace android | 74 } // namespace android |
74 } // namespace base | 75 } // namespace base |
75 | 76 |
76 #endif // BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ | 77 #endif // BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ |
OLD | NEW |