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