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