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" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 namespace android { | 13 namespace android { |
14 | 14 |
15 // The process the shared library is loaded in. | 15 // The process the shared library is loaded in. |
16 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.base.library_loader | 16 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.base.library_loader |
17 enum LibraryProcessType { | 17 enum LibraryProcessType { |
18 // The LibraryLoad has not been initialized. | 18 // The LibraryLoad has not been initialized. |
19 PROCESS_UNINITIALIZED = 0, | 19 PROCESS_UNINITIALIZED = 0, |
20 // Shared library is running in browser process. | 20 // Shared library is running in browser process. |
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 // Shared library is running in child process as part of WebAPK. |
| 29 PROCESS_WEBAPK_CHILD = 5, |
28 }; | 30 }; |
29 | 31 |
30 // Record any pending renderer histogram value as a histogram. Pending values | 32 // Record any pending renderer histogram value as a histogram. Pending values |
31 // are set by RegisterChromiumAndroidLinkerRendererHistogram. | 33 // are set by RegisterChromiumAndroidLinkerRendererHistogram. |
32 BASE_EXPORT void RecordChromiumAndroidLinkerRendererHistogram(); | 34 BASE_EXPORT void RecordChromiumAndroidLinkerRendererHistogram(); |
33 | 35 |
34 // Registers the callbacks that allows the entry point of the library to be | 36 // 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 | 37 // exposed to the calling java code. This handles only registering the |
36 // the callbacks needed by the loader. Any application specific JNI bindings | 38 // 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 | 39 // should happen once the native library has fully loaded, either in the library |
(...skipping 29 matching lines...) Expand all Loading... |
67 BASE_EXPORT LibraryProcessType GetLibraryProcessType(JNIEnv* env); | 69 BASE_EXPORT LibraryProcessType GetLibraryProcessType(JNIEnv* env); |
68 | 70 |
69 // Initialize AtExitManager, this must be done at the begining of loading | 71 // Initialize AtExitManager, this must be done at the begining of loading |
70 // shared library. | 72 // shared library. |
71 void InitAtExitManager(); | 73 void InitAtExitManager(); |
72 | 74 |
73 } // namespace android | 75 } // namespace android |
74 } // namespace base | 76 } // namespace base |
75 | 77 |
76 #endif // BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ | 78 #endif // BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ |
OLD | NEW |