Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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. |
| 4 | |
| 5 | #include "base/android/base_jni_registrar.h" |
| 6 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 7 | #include "base/android/activity_status.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 8 | #include "base/android/build_info.h" |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 9 | #include "base/android/cpu_features.h" |
| 10 | #include "base/android/important_file_writer_android.h" |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 11 | #include "base/android/java_handler_thread.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 12 | #include "base/android/jni_android.h" |
| 13 | #include "base/android/jni_registrar.h" |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 14 | #include "base/android/memory_pressure_listener_android.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 15 | #include "base/android/path_service_android.h" |
| 16 | #include "base/android/path_utils.h" |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 17 | #include "base/android/sys_utils.h" |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 18 | #include "base/android/thread_utils.h" |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 19 | #include "base/basictypes.h" |
| 20 | #include "base/debug/trace_event.h" |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 21 | #include "base/message_loop/message_pump_android.h" |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame] | 22 | #include "base/power_monitor/power_monitor_device_source_android.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 23 | |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 24 | #if defined(GOOGLE_TV) |
| 25 | #include "base/android/context_types.h" |
| 26 | #endif |
| 27 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 28 | namespace base { |
| 29 | namespace android { |
| 30 | |
| 31 | static RegistrationMethod kBaseRegisteredMethods[] = { |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 32 | { "ActivityStatus", base::android::ActivityStatus::RegisterBindings }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 33 | { "BuildInfo", base::android::BuildInfo::RegisterBindings }, |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 34 | #if defined(GOOGLE_TV) |
| 35 | { "ContextTypes", base::android::RegisterContextTypes }, |
| 36 | #endif |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 37 | { "CpuFeatures", base::android::RegisterCpuFeatures }, |
| 38 | { "ImportantFileWriterAndroid", |
| 39 | base::android::RegisterImportantFileWriterAndroid }, |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 40 | { "MemoryPressureListenerAndroid", |
| 41 | base::android::MemoryPressureListenerAndroid::Register }, |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 42 | { "JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 43 | { "PathService", base::android::RegisterPathService }, |
| 44 | { "PathUtils", base::android::RegisterPathUtils }, |
| 45 | { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 46 | { "SysUtils", base::android::SysUtils::Register }, |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 47 | { "PowerMonitor", base::RegisterPowerMonitor }, |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 48 | { "ThreadUtils", base::RegisterThreadUtils }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | bool RegisterJni(JNIEnv* env) { |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 52 | TRACE_EVENT0("startup", "base_android::RegisterJni"); |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 53 | return RegisterNativeMethods(env, kBaseRegisteredMethods, |
| 54 | arraysize(kBaseRegisteredMethods)); |
| 55 | } |
| 56 | |
| 57 | } // namespace android |
| 58 | } // namespace base |