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

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

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

Powered by Google App Engine
This is Rietveld 408576698