Add a stat to the smoothness benchmark for avg number of missing tiles.
[chromium-blink-merge.git] / base / system_monitor / system_monitor_android.cc
blob4e1a16b3e91f379f26bd829b55f62f08ca9cba46
1 // Copyright (c) 2011 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.
5 #include "base/system_monitor/system_monitor.h"
6 #include "jni/SystemMonitor_jni.h"
8 namespace base {
10 namespace android {
12 // Native implementation of SystemMonitor.java.
13 void OnBatteryChargingChanged(JNIEnv* env,
14 jclass clazz) {
15 SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT);
18 } // namespace android
20 bool SystemMonitor::IsBatteryPower() {
21 JNIEnv* env = base::android::AttachCurrentThread();
22 return base::android::Java_SystemMonitor_isBatteryPower(env);
25 bool RegisterSystemMonitor(JNIEnv* env) {
26 return base::android::RegisterNativesImpl(env);
29 } // namespace base