| 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/application_status_listener.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/event_log.h" | 12 #include "base/android/event_log.h" |
| 13 #include "base/android/field_trial_list.h" | 13 #include "base/android/field_trial_list.h" |
| 14 #include "base/android/important_file_writer_android.h" | 14 #include "base/android/important_file_writer_android.h" |
| 15 #include "base/android/java_handler_thread.h" | 15 #include "base/android/java_handler_thread.h" |
| 16 #include "base/android/jni_android.h" | 16 #include "base/android/jni_android.h" |
| 17 #include "base/android/jni_registrar.h" | 17 #include "base/android/jni_registrar.h" |
| 18 #include "base/android/jni_utils.h" | 18 #include "base/android/jni_utils.h" |
| 19 #include "base/android/locale_utils.h" | 19 #include "base/android/locale_utils.h" |
| 20 #include "base/android/memory_pressure_listener_android.h" | 20 #include "base/android/memory_pressure_listener_android.h" |
| 21 #include "base/android/path_service_android.h" | 21 #include "base/android/path_service_android.h" |
| 22 #include "base/android/path_utils.h" | 22 #include "base/android/path_utils.h" |
| 23 #include "base/android/record_histogram.h" |
| 23 #include "base/android/sys_utils.h" | 24 #include "base/android/sys_utils.h" |
| 24 #include "base/android/thread_utils.h" | 25 #include "base/android/thread_utils.h" |
| 25 #include "base/android/trace_event_binding.h" | 26 #include "base/android/trace_event_binding.h" |
| 26 #include "base/basictypes.h" | 27 #include "base/basictypes.h" |
| 27 #include "base/debug/trace_event.h" | 28 #include "base/debug/trace_event.h" |
| 28 #include "base/message_loop/message_pump_android.h" | 29 #include "base/message_loop/message_pump_android.h" |
| 29 #include "base/power_monitor/power_monitor_device_source_android.h" | 30 #include "base/power_monitor/power_monitor_device_source_android.h" |
| 30 | 31 |
| 31 namespace base { | 32 namespace base { |
| 32 namespace android { | 33 namespace android { |
| 33 | 34 |
| 34 static RegistrationMethod kBaseRegisteredMethods[] = { | 35 static RegistrationMethod kBaseRegisteredMethods[] = { |
| 35 { "ApplicationStatusListener", | 36 {"ApplicationStatusListener", |
| 36 base::android::ApplicationStatusListener::RegisterBindings }, | 37 base::android::ApplicationStatusListener::RegisterBindings}, |
| 37 { "BuildInfo", base::android::BuildInfo::RegisterBindings }, | 38 {"BuildInfo", base::android::BuildInfo::RegisterBindings}, |
| 38 { "CommandLine", base::android::RegisterCommandLine }, | 39 {"CommandLine", base::android::RegisterCommandLine}, |
| 39 { "ContentUriUtils", base::RegisterContentUriUtils }, | 40 {"ContentUriUtils", base::RegisterContentUriUtils}, |
| 40 { "CpuFeatures", base::android::RegisterCpuFeatures }, | 41 {"CpuFeatures", base::android::RegisterCpuFeatures}, |
| 41 { "EventLog", base::android::RegisterEventLog }, | 42 {"EventLog", base::android::RegisterEventLog}, |
| 42 { "FieldTrialList", base::android::RegisterFieldTrialList }, | 43 {"FieldTrialList", base::android::RegisterFieldTrialList}, |
| 43 { "ImportantFileWriterAndroid", | 44 {"ImportantFileWriterAndroid", |
| 44 base::android::RegisterImportantFileWriterAndroid }, | 45 base::android::RegisterImportantFileWriterAndroid}, |
| 45 { "JNIUtils", base::android::RegisterJNIUtils }, | 46 {"JNIUtils", base::android::RegisterJNIUtils}, |
| 46 { "LocaleUtils", base::android::RegisterLocaleUtils }, | 47 {"LocaleUtils", base::android::RegisterLocaleUtils}, |
| 47 { "MemoryPressureListenerAndroid", | 48 {"MemoryPressureListenerAndroid", |
| 48 base::android::MemoryPressureListenerAndroid::Register }, | 49 base::android::MemoryPressureListenerAndroid::Register}, |
| 49 { "JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings }, | 50 {"JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings}, |
| 50 { "PathService", base::android::RegisterPathService }, | 51 {"PathService", base::android::RegisterPathService}, |
| 51 { "PathUtils", base::android::RegisterPathUtils }, | 52 {"PathUtils", base::android::RegisterPathUtils}, |
| 52 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, | 53 {"PowerMonitor", base::RegisterPowerMonitor}, |
| 53 { "SysUtils", base::android::SysUtils::Register }, | 54 {"RecordHistogram", base::android::RegisterRecordHistogram}, |
| 54 { "PowerMonitor", base::RegisterPowerMonitor }, | 55 {"SystemMessageHandler", base::MessagePumpForUI::RegisterBindings}, |
| 55 { "ThreadUtils", base::RegisterThreadUtils }, | 56 {"SysUtils", base::android::SysUtils::Register}, |
| 56 { "TraceEvent", base::android::RegisterTraceEvent }, | 57 {"ThreadUtils", base::RegisterThreadUtils}, |
| 58 {"TraceEvent", base::android::RegisterTraceEvent}, |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 bool RegisterJni(JNIEnv* env) { | 61 bool RegisterJni(JNIEnv* env) { |
| 60 TRACE_EVENT0("startup", "base_android::RegisterJni"); | 62 TRACE_EVENT0("startup", "base_android::RegisterJni"); |
| 61 return RegisterNativeMethods(env, kBaseRegisteredMethods, | 63 return RegisterNativeMethods(env, kBaseRegisteredMethods, |
| 62 arraysize(kBaseRegisteredMethods)); | 64 arraysize(kBaseRegisteredMethods)); |
| 63 } | 65 } |
| 64 | 66 |
| 65 } // namespace android | 67 } // namespace android |
| 66 } // namespace base | 68 } // namespace base |
| OLD | NEW |