Chromium Code Reviews| 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, | |
|
michaelbai
2016/06/02 00:14:51
Do you really need separated type for WebAPK? From
Xi Han
2016/06/07 18:49:59
Hmmm, we check the type and did something special
| |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 // Record any pending renderer histogram value as histograms. Pending values | 32 // Record any pending renderer histogram value as histograms. Pending values |
| 31 // are set by RegisterChromiumAndroidLinkerRendererHistogram and | 33 // are set by RegisterChromiumAndroidLinkerRendererHistogram and |
| 32 // RegisterLibraryPreloaderRendererHistogram. | 34 // RegisterLibraryPreloaderRendererHistogram. |
| 33 BASE_EXPORT void RecordLibraryLoaderRendererHistograms(); | 35 BASE_EXPORT void RecordLibraryLoaderRendererHistograms(); |
| 34 | 36 |
| 35 // Registers the callbacks that allows the entry point of the library to be | 37 // Registers the callbacks that allows the entry point of the library to be |
| 36 // exposed to the calling java code. This handles only registering the | 38 // exposed to the calling java code. This handles only registering the |
| 37 // the callbacks needed by the loader. Any application specific JNI bindings | 39 // the callbacks needed by the loader. Any application specific JNI bindings |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 68 BASE_EXPORT LibraryProcessType GetLibraryProcessType(JNIEnv* env); | 70 BASE_EXPORT LibraryProcessType GetLibraryProcessType(JNIEnv* env); |
| 69 | 71 |
| 70 // Initialize AtExitManager, this must be done at the begining of loading | 72 // Initialize AtExitManager, this must be done at the begining of loading |
| 71 // shared library. | 73 // shared library. |
| 72 void InitAtExitManager(); | 74 void InitAtExitManager(); |
| 73 | 75 |
| 74 } // namespace android | 76 } // namespace android |
| 75 } // namespace base | 77 } // namespace base |
| 76 | 78 |
| 77 #endif // BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ | 79 #endif // BASE_ANDROID_LIBRARY_LOADER_LIBRARY_LOADER_HOOKS_H_ |
| OLD | NEW |