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

Unified Diff: base/system_monitor/system_monitor_android.cc

Issue 10959020: SystemMonitor refactoring: move power state monitor into a separate class called PowerMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use holder class for lazy initialization on Android Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/system_monitor/system_monitor_android.h ('k') | base/system_monitor/system_monitor_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor_android.cc
diff --git a/base/system_monitor/system_monitor_android.cc b/base/system_monitor/system_monitor_android.cc
deleted file mode 100644
index f29b7b0380279ac59461f02369142a687a24c297..0000000000000000000000000000000000000000
--- a/base/system_monitor/system_monitor_android.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/system_monitor/system_monitor.h"
-#include "jni/SystemMonitor_jni.h"
-
-namespace base {
-
-namespace android {
-
-// Native implementation of SystemMonitor.java.
-void OnBatteryChargingChanged(JNIEnv* env, jclass clazz) {
- SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT);
-}
-
-void OnMainActivityResumed(JNIEnv* env, jclass clazz) {
- SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::RESUME_EVENT);
-}
-
-void OnMainActivitySuspended(JNIEnv* env, jclass clazz) {
- SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::SUSPEND_EVENT);
-}
-
-} // namespace android
-
-bool SystemMonitor::IsBatteryPower() {
- JNIEnv* env = base::android::AttachCurrentThread();
- return base::android::Java_SystemMonitor_isBatteryPower(env);
-}
-
-bool RegisterSystemMonitor(JNIEnv* env) {
- return base::android::RegisterNativesImpl(env);
-}
-
-} // namespace base
« no previous file with comments | « base/system_monitor/system_monitor_android.h ('k') | base/system_monitor/system_monitor_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698