| 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/activity_status.h" |
| 8 #include "base/android/build_info.h" | 8 #include "base/android/build_info.h" |
| 9 #include "base/android/cpu_features.h" | 9 #include "base/android/cpu_features.h" |
| 10 #include "base/android/important_file_writer_android.h" | 10 #include "base/android/important_file_writer_android.h" |
| 11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
| 12 #include "base/android/jni_registrar.h" | 12 #include "base/android/jni_registrar.h" |
| 13 #include "base/android/memory_pressure_listener_android.h" |
| 13 #include "base/android/path_service_android.h" | 14 #include "base/android/path_service_android.h" |
| 14 #include "base/android/path_utils.h" | 15 #include "base/android/path_utils.h" |
| 15 #include "base/android/thread_utils.h" | 16 #include "base/android/thread_utils.h" |
| 16 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
| 17 #include "base/debug/trace_event.h" | 18 #include "base/debug/trace_event.h" |
| 18 #include "base/message_pump_android.h" | 19 #include "base/message_pump_android.h" |
| 19 #include "base/power_monitor/power_monitor_android.h" | 20 #include "base/power_monitor/power_monitor_android.h" |
| 20 | 21 |
| 21 #if defined(GOOGLE_TV) | 22 #if defined(GOOGLE_TV) |
| 22 #include "base/android/context_types.h" | 23 #include "base/android/context_types.h" |
| 23 #endif | 24 #endif |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 namespace android { | 27 namespace android { |
| 27 | 28 |
| 28 static RegistrationMethod kBaseRegisteredMethods[] = { | 29 static RegistrationMethod kBaseRegisteredMethods[] = { |
| 29 { "ActivityStatus", base::android::ActivityStatus::RegisterBindings }, | 30 { "ActivityStatus", base::android::ActivityStatus::RegisterBindings }, |
| 30 { "BuildInfo", base::android::BuildInfo::RegisterBindings }, | 31 { "BuildInfo", base::android::BuildInfo::RegisterBindings }, |
| 31 #if defined(GOOGLE_TV) | 32 #if defined(GOOGLE_TV) |
| 32 { "ContextTypes", base::android::RegisterContextTypes }, | 33 { "ContextTypes", base::android::RegisterContextTypes }, |
| 33 #endif | 34 #endif |
| 34 { "CpuFeatures", base::android::RegisterCpuFeatures }, | 35 { "CpuFeatures", base::android::RegisterCpuFeatures }, |
| 35 { "ImportantFileWriterAndroid", | 36 { "ImportantFileWriterAndroid", |
| 36 base::android::RegisterImportantFileWriterAndroid }, | 37 base::android::RegisterImportantFileWriterAndroid }, |
| 38 { "MemoryPressureListenerAndroid", |
| 39 base::android::MemoryPressureListenerAndroid::Register }, |
| 37 { "PathService", base::android::RegisterPathService }, | 40 { "PathService", base::android::RegisterPathService }, |
| 38 { "PathUtils", base::android::RegisterPathUtils }, | 41 { "PathUtils", base::android::RegisterPathUtils }, |
| 39 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, | 42 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, |
| 40 { "PowerMonitor", base::RegisterPowerMonitor }, | 43 { "PowerMonitor", base::RegisterPowerMonitor }, |
| 41 { "ThreadUtils", base::RegisterThreadUtils }, | 44 { "ThreadUtils", base::RegisterThreadUtils }, |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 bool RegisterJni(JNIEnv* env) { | 47 bool RegisterJni(JNIEnv* env) { |
| 45 TRACE_EVENT0("startup", "base_android::RegisterJni"); | 48 TRACE_EVENT0("startup", "base_android::RegisterJni"); |
| 46 return RegisterNativeMethods(env, kBaseRegisteredMethods, | 49 return RegisterNativeMethods(env, kBaseRegisteredMethods, |
| 47 arraysize(kBaseRegisteredMethods)); | 50 arraysize(kBaseRegisteredMethods)); |
| 48 } | 51 } |
| 49 | 52 |
| 50 } // namespace android | 53 } // namespace android |
| 51 } // namespace base | 54 } // namespace base |
| OLD | NEW |