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/animation_frame_time_histogram.h" | 7 #include "base/android/animation_frame_time_histogram.h" |
8 #include "base/android/apk_assets.h" | |
9 #include "base/android/application_status_listener.h" | 8 #include "base/android/application_status_listener.h" |
10 #include "base/android/build_info.h" | |
11 #include "base/android/callback_android.h" | |
12 #include "base/android/command_line_android.h" | 9 #include "base/android/command_line_android.h" |
13 #include "base/android/content_uri_utils.h" | |
14 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
15 #include "base/android/cpu_features.h" | 11 #include "base/android/cpu_features.h" |
16 #include "base/android/early_trace_event_binding.h" | 12 #include "base/android/early_trace_event_binding.h" |
17 #include "base/android/event_log.h" | |
18 #include "base/android/field_trial_list.h" | 13 #include "base/android/field_trial_list.h" |
19 #include "base/android/important_file_writer_android.h" | 14 #include "base/android/important_file_writer_android.h" |
20 #include "base/android/java_handler_thread.h" | 15 #include "base/android/java_handler_thread.h" |
21 #include "base/android/java_runtime.h" | |
22 #include "base/android/jni_android.h" | 16 #include "base/android/jni_android.h" |
23 #include "base/android/jni_registrar.h" | 17 #include "base/android/jni_registrar.h" |
24 #include "base/android/jni_utils.h" | |
25 #include "base/android/locale_utils.h" | |
26 #include "base/android/memory_pressure_listener_android.h" | 18 #include "base/android/memory_pressure_listener_android.h" |
27 #include "base/android/path_service_android.h" | 19 #include "base/android/path_service_android.h" |
28 #include "base/android/path_utils.h" | |
29 #include "base/android/record_histogram.h" | 20 #include "base/android/record_histogram.h" |
30 #include "base/android/record_user_action.h" | 21 #include "base/android/record_user_action.h" |
31 #include "base/android/sys_utils.h" | |
32 #include "base/android/thread_utils.h" | |
33 #include "base/android/trace_event_binding.h" | 22 #include "base/android/trace_event_binding.h" |
34 #include "base/macros.h" | 23 #include "base/macros.h" |
35 #include "base/message_loop/message_pump_android.h" | 24 #include "base/message_loop/message_pump_android.h" |
36 #include "base/power_monitor/power_monitor_device_source_android.h" | 25 #include "base/power_monitor/power_monitor_device_source_android.h" |
37 #include "base/trace_event/trace_event.h" | 26 #include "base/trace_event/trace_event.h" |
38 | 27 |
39 namespace base { | 28 namespace base { |
40 namespace android { | 29 namespace android { |
41 | 30 |
42 static RegistrationMethod kBaseRegisteredMethods[] = { | 31 static RegistrationMethod kBaseRegisteredMethods[] = { |
43 {"AnimationFrameTimeHistogram", | 32 {"AnimationFrameTimeHistogram", |
44 base::android::RegisterAnimationFrameTimeHistogram}, | 33 base::android::RegisterAnimationFrameTimeHistogram}, |
45 {"ApkAssets", base::android::RegisterApkAssets}, | |
46 {"ApplicationStatusListener", | 34 {"ApplicationStatusListener", |
47 base::android::ApplicationStatusListener::RegisterBindings}, | 35 base::android::ApplicationStatusListener::RegisterBindings}, |
48 {"BuildInfo", base::android::BuildInfo::RegisterBindings}, | |
49 {"CallbackAndroid", base::android::RegisterCallbackAndroid}, | |
50 {"CommandLine", base::android::RegisterCommandLine}, | 36 {"CommandLine", base::android::RegisterCommandLine}, |
51 {"ContentUriUtils", base::RegisterContentUriUtils}, | |
52 {"ContextUtils", base::android::RegisterContextUtils}, | 37 {"ContextUtils", base::android::RegisterContextUtils}, |
53 {"CpuFeatures", base::android::RegisterCpuFeatures}, | 38 {"CpuFeatures", base::android::RegisterCpuFeatures}, |
54 {"EarlyTraceEvent", base::android::RegisterEarlyTraceEvent}, | 39 {"EarlyTraceEvent", base::android::RegisterEarlyTraceEvent}, |
55 {"EventLog", base::android::RegisterEventLog}, | |
56 {"FieldTrialList", base::android::RegisterFieldTrialList}, | 40 {"FieldTrialList", base::android::RegisterFieldTrialList}, |
57 {"ImportantFileWriterAndroid", | 41 {"ImportantFileWriterAndroid", |
58 base::android::RegisterImportantFileWriterAndroid}, | 42 base::android::RegisterImportantFileWriterAndroid}, |
59 {"JNIUtils", base::android::RegisterJNIUtils}, | |
60 {"LocaleUtils", base::android::RegisterLocaleUtils}, | |
61 {"MemoryPressureListenerAndroid", | 43 {"MemoryPressureListenerAndroid", |
62 base::android::MemoryPressureListenerAndroid::Register}, | 44 base::android::MemoryPressureListenerAndroid::Register}, |
63 {"JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings}, | 45 {"JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings}, |
64 {"PathService", base::android::RegisterPathService}, | 46 {"PathService", base::android::RegisterPathService}, |
65 {"PathUtils", base::android::RegisterPathUtils}, | |
66 {"PowerMonitor", base::RegisterPowerMonitor}, | 47 {"PowerMonitor", base::RegisterPowerMonitor}, |
67 {"RecordHistogram", base::android::RegisterRecordHistogram}, | 48 {"RecordHistogram", base::android::RegisterRecordHistogram}, |
68 {"RecordUserAction", base::android::RegisterRecordUserAction}, | 49 {"RecordUserAction", base::android::RegisterRecordUserAction}, |
69 {"Runtime", base::android::JavaRuntime::Register}, | |
70 {"SystemMessageHandler", base::MessagePumpForUI::RegisterBindings}, | 50 {"SystemMessageHandler", base::MessagePumpForUI::RegisterBindings}, |
71 {"SysUtils", base::android::SysUtils::Register}, | |
72 {"ThreadUtils", base::RegisterThreadUtils}, | |
73 {"TraceEvent", base::android::RegisterTraceEvent}, | 51 {"TraceEvent", base::android::RegisterTraceEvent}, |
74 }; | 52 }; |
75 | 53 |
76 bool RegisterJni(JNIEnv* env) { | 54 bool RegisterJni(JNIEnv* env) { |
77 TRACE_EVENT0("startup", "base_android::RegisterJni"); | 55 TRACE_EVENT0("startup", "base_android::RegisterJni"); |
78 return RegisterNativeMethods(env, kBaseRegisteredMethods, | 56 return RegisterNativeMethods(env, kBaseRegisteredMethods, |
79 arraysize(kBaseRegisteredMethods)); | 57 arraysize(kBaseRegisteredMethods)); |
80 } | 58 } |
81 | 59 |
82 } // namespace android | 60 } // namespace android |
83 } // namespace base | 61 } // namespace base |
OLD | NEW |