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 "base/android/base_jni_registrar.h" | 5 #include "base/android/base_jni_registrar.h" |
6 | 6 |
7 #include "base/android/activity_status.h" | 7 #include "base/android/application_status_listener.h" |
8 #include "base/android/build_info.h" | 8 #include "base/android/build_info.h" |
9 #include "base/android/command_line_android.h" | 9 #include "base/android/command_line_android.h" |
10 #include "base/android/content_uri_utils.h" | 10 #include "base/android/content_uri_utils.h" |
11 #include "base/android/cpu_features.h" | 11 #include "base/android/cpu_features.h" |
12 #include "base/android/important_file_writer_android.h" | 12 #include "base/android/important_file_writer_android.h" |
13 #include "base/android/java_handler_thread.h" | 13 #include "base/android/java_handler_thread.h" |
14 #include "base/android/jni_android.h" | 14 #include "base/android/jni_android.h" |
15 #include "base/android/jni_registrar.h" | 15 #include "base/android/jni_registrar.h" |
16 #include "base/android/memory_pressure_listener_android.h" | 16 #include "base/android/memory_pressure_listener_android.h" |
17 #include "base/android/path_service_android.h" | 17 #include "base/android/path_service_android.h" |
18 #include "base/android/path_utils.h" | 18 #include "base/android/path_utils.h" |
19 #include "base/android/sys_utils.h" | 19 #include "base/android/sys_utils.h" |
20 #include "base/android/thread_utils.h" | 20 #include "base/android/thread_utils.h" |
21 #include "base/android/trace_event_binding.h" | 21 #include "base/android/trace_event_binding.h" |
22 #include "base/basictypes.h" | 22 #include "base/basictypes.h" |
23 #include "base/debug/trace_event.h" | 23 #include "base/debug/trace_event.h" |
24 #include "base/message_loop/message_pump_android.h" | 24 #include "base/message_loop/message_pump_android.h" |
25 #include "base/power_monitor/power_monitor_device_source_android.h" | 25 #include "base/power_monitor/power_monitor_device_source_android.h" |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 namespace android { | 28 namespace android { |
29 | 29 |
30 static RegistrationMethod kBaseRegisteredMethods[] = { | 30 static RegistrationMethod kBaseRegisteredMethods[] = { |
31 { "ActivityStatus", base::android::ActivityStatus::RegisterBindings }, | 31 { "ApplicationStatusListener", |
| 32 base::android::ApplicationStatusListener::RegisterBindings }, |
32 { "BuildInfo", base::android::BuildInfo::RegisterBindings }, | 33 { "BuildInfo", base::android::BuildInfo::RegisterBindings }, |
33 { "CommandLine", base::android::RegisterCommandLine }, | 34 { "CommandLine", base::android::RegisterCommandLine }, |
34 { "ContentUriUtils", base::RegisterContentUriUtils }, | 35 { "ContentUriUtils", base::RegisterContentUriUtils }, |
35 { "CpuFeatures", base::android::RegisterCpuFeatures }, | 36 { "CpuFeatures", base::android::RegisterCpuFeatures }, |
36 { "ImportantFileWriterAndroid", | 37 { "ImportantFileWriterAndroid", |
37 base::android::RegisterImportantFileWriterAndroid }, | 38 base::android::RegisterImportantFileWriterAndroid }, |
38 { "MemoryPressureListenerAndroid", | 39 { "MemoryPressureListenerAndroid", |
39 base::android::MemoryPressureListenerAndroid::Register }, | 40 base::android::MemoryPressureListenerAndroid::Register }, |
40 { "JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings }, | 41 { "JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings }, |
41 { "PathService", base::android::RegisterPathService }, | 42 { "PathService", base::android::RegisterPathService }, |
42 { "PathUtils", base::android::RegisterPathUtils }, | 43 { "PathUtils", base::android::RegisterPathUtils }, |
43 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, | 44 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, |
44 { "SysUtils", base::android::SysUtils::Register }, | 45 { "SysUtils", base::android::SysUtils::Register }, |
45 { "PowerMonitor", base::RegisterPowerMonitor }, | 46 { "PowerMonitor", base::RegisterPowerMonitor }, |
46 { "ThreadUtils", base::RegisterThreadUtils }, | 47 { "ThreadUtils", base::RegisterThreadUtils }, |
47 { "TraceEvent", base::android::RegisterTraceEvent }, | 48 { "TraceEvent", base::android::RegisterTraceEvent }, |
48 }; | 49 }; |
49 | 50 |
50 bool RegisterJni(JNIEnv* env) { | 51 bool RegisterJni(JNIEnv* env) { |
51 TRACE_EVENT0("startup", "base_android::RegisterJni"); | 52 TRACE_EVENT0("startup", "base_android::RegisterJni"); |
52 return RegisterNativeMethods(env, kBaseRegisteredMethods, | 53 return RegisterNativeMethods(env, kBaseRegisteredMethods, |
53 arraysize(kBaseRegisteredMethods)); | 54 arraysize(kBaseRegisteredMethods)); |
54 } | 55 } |
55 | 56 |
56 } // namespace android | 57 } // namespace android |
57 } // namespace base | 58 } // namespace base |
OLD | NEW |