Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: base/android/base_jni_registrar.cc

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android Fixed Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/base.gypi » ('j') | base/power_monitor/power_monitor.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory_pressure_listener_android.h"
14 #include "base/android/path_service_android.h" 14 #include "base/android/path_service_android.h"
15 #include "base/android/path_utils.h" 15 #include "base/android/path_utils.h"
16 #include "base/android/sys_utils.h" 16 #include "base/android/sys_utils.h"
17 #include "base/android/thread_utils.h" 17 #include "base/android/thread_utils.h"
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "base/debug/trace_event.h" 19 #include "base/debug/trace_event.h"
20 #include "base/message_loop/message_pump_android.h" 20 #include "base/message_loop/message_pump_android.h"
21 #include "base/power_monitor/power_monitor_android.h" 21 #include "base/power_monitor/power_monitor_device_source_android.h"
22 22
23 #if defined(GOOGLE_TV) 23 #if defined(GOOGLE_TV)
24 #include "base/android/context_types.h" 24 #include "base/android/context_types.h"
25 #endif 25 #endif
26 26
27 namespace base { 27 namespace base {
28 namespace android { 28 namespace android {
29 29
30 static RegistrationMethod kBaseRegisteredMethods[] = { 30 static RegistrationMethod kBaseRegisteredMethods[] = {
31 { "ActivityStatus", base::android::ActivityStatus::RegisterBindings }, 31 { "ActivityStatus", base::android::ActivityStatus::RegisterBindings },
32 { "BuildInfo", base::android::BuildInfo::RegisterBindings }, 32 { "BuildInfo", base::android::BuildInfo::RegisterBindings },
33 #if defined(GOOGLE_TV) 33 #if defined(GOOGLE_TV)
34 { "ContextTypes", base::android::RegisterContextTypes }, 34 { "ContextTypes", base::android::RegisterContextTypes },
35 #endif 35 #endif
36 { "CpuFeatures", base::android::RegisterCpuFeatures }, 36 { "CpuFeatures", base::android::RegisterCpuFeatures },
37 { "ImportantFileWriterAndroid", 37 { "ImportantFileWriterAndroid",
38 base::android::RegisterImportantFileWriterAndroid }, 38 base::android::RegisterImportantFileWriterAndroid },
39 { "MemoryPressureListenerAndroid", 39 { "MemoryPressureListenerAndroid",
40 base::android::MemoryPressureListenerAndroid::Register }, 40 base::android::MemoryPressureListenerAndroid::Register },
41 { "PathService", base::android::RegisterPathService }, 41 { "PathService", base::android::RegisterPathService },
42 { "PathUtils", base::android::RegisterPathUtils }, 42 { "PathUtils", base::android::RegisterPathUtils },
43 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings }, 43 { "SystemMessageHandler", base::MessagePumpForUI::RegisterBindings },
44 { "SysUtils", base::android::SysUtils::Register }, 44 { "SysUtils", base::android::SysUtils::Register },
45 { "PowerMonitor", base::RegisterPowerMonitor }, 45 { "PowerMonitor", base::RegisterPowerMonitor },
vandebo (ex-Chrome) 2013/07/09 22:22:08 Does this need to be updated?
46 { "ThreadUtils", base::RegisterThreadUtils }, 46 { "ThreadUtils", base::RegisterThreadUtils },
47 }; 47 };
48 48
49 bool RegisterJni(JNIEnv* env) { 49 bool RegisterJni(JNIEnv* env) {
50 TRACE_EVENT0("startup", "base_android::RegisterJni"); 50 TRACE_EVENT0("startup", "base_android::RegisterJni");
51 return RegisterNativeMethods(env, kBaseRegisteredMethods, 51 return RegisterNativeMethods(env, kBaseRegisteredMethods,
52 arraysize(kBaseRegisteredMethods)); 52 arraysize(kBaseRegisteredMethods));
53 } 53 }
54 54
55 } // namespace android 55 } // namespace android
56 } // namespace base 56 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/base.gypi » ('j') | base/power_monitor/power_monitor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698