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 #include "content/public/app/android_library_loader_hooks.h" | 5 #include "content/public/app/android_library_loader_hooks.h" |
6 | 6 |
7 #include "base/android/base_jni_registrar.h" | 7 #include "base/android/base_jni_registrar.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/debug/trace_event.h" | 13 #include "base/debug/trace_event.h" |
14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/string_tokenizer.h" | 17 #include "base/string_tokenizer.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/tracked_objects.h" | 19 #include "base/tracked_objects.h" |
20 #include "content/app/android/app_jni_registrar.h" | 20 #include "content/app/android/app_jni_registrar.h" |
21 #include "content/browser/android/browser_jni_registrar.h" | 21 #include "content/browser/android/browser_jni_registrar.h" |
22 #include "content/common/android/common_jni_registrar.h" | 22 #include "content/common/android/common_jni_registrar.h" |
23 #include "content/common/android/command_line.h" | 23 #include "content/common/android/command_line.h" |
24 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
25 #include "media/base/android/media_jni_registrar.h" | 25 #include "media/base/android/media_jni_registrar.h" |
26 #include "net/android/net_jni_registrar.h" | 26 #include "net/android/net_jni_registrar.h" |
| 27 #include "ui/android/ui_jni_registrar.h" |
27 #include "jni/LibraryLoader_jni.h" | 28 #include "jni/LibraryLoader_jni.h" |
28 #include "ui/gfx/android/gfx_jni_registrar.h" | 29 #include "ui/gfx/android/gfx_jni_registrar.h" |
29 | 30 |
30 namespace { | 31 namespace { |
31 base::AtExitManager* g_at_exit_manager = NULL; | 32 base::AtExitManager* g_at_exit_manager = NULL; |
32 } | 33 } |
33 | 34 |
34 namespace content { | 35 namespace content { |
35 | 36 |
36 static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz, | 37 static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz, |
(...skipping 22 matching lines...) Expand all Loading... |
59 false); // Tick count | 60 false); // Tick count |
60 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() | 61 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() |
61 << ", default verbosity = " << logging::GetVlogVerbosity(); | 62 << ", default verbosity = " << logging::GetVlogVerbosity(); |
62 | 63 |
63 if (!base::android::RegisterJni(env)) | 64 if (!base::android::RegisterJni(env)) |
64 return JNI_FALSE; | 65 return JNI_FALSE; |
65 | 66 |
66 if (!net::android::RegisterJni(env)) | 67 if (!net::android::RegisterJni(env)) |
67 return JNI_FALSE; | 68 return JNI_FALSE; |
68 | 69 |
| 70 if (!ui::RegisterJni(env)) |
| 71 return JNI_FALSE; |
| 72 |
69 if (!content::android::RegisterCommonJni(env)) | 73 if (!content::android::RegisterCommonJni(env)) |
70 return JNI_FALSE; | 74 return JNI_FALSE; |
71 | 75 |
72 if (!content::android::RegisterBrowserJni(env)) | 76 if (!content::android::RegisterBrowserJni(env)) |
73 return JNI_FALSE; | 77 return JNI_FALSE; |
74 | 78 |
75 if (!content::android::RegisterAppJni(env)) | 79 if (!content::android::RegisterAppJni(env)) |
76 return JNI_FALSE; | 80 return JNI_FALSE; |
77 | 81 |
78 if (!media::RegisterJni(env)) | 82 if (!media::RegisterJni(env)) |
(...skipping 13 matching lines...) Expand all Loading... |
92 } | 96 } |
93 | 97 |
94 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) { | 98 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) { |
95 // We need the AtExitManager to be created at the very beginning. | 99 // We need the AtExitManager to be created at the very beginning. |
96 g_at_exit_manager = new base::AtExitManager(); | 100 g_at_exit_manager = new base::AtExitManager(); |
97 | 101 |
98 return RegisterNativesImpl(env); | 102 return RegisterNativesImpl(env); |
99 } | 103 } |
100 | 104 |
101 } // namespace content | 105 } // namespace content |
OLD | NEW |