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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java

Issue 267893003: Battery Status API: add plumbing for multi-platform support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.BroadcastReceiver; 7 import android.content.BroadcastReceiver;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.IntentFilter; 10 import android.content.IntentFilter;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 double dischargingTime, double level) { 110 double dischargingTime, double level) {
111 synchronized (mNativePtrLock) { 111 synchronized (mNativePtrLock) {
112 if (mNativePtr != 0) { 112 if (mNativePtr != 0) {
113 nativeGotBatteryStatus(mNativePtr, charging, chargingTime, disch argingTime, level); 113 nativeGotBatteryStatus(mNativePtr, charging, chargingTime, disch argingTime, level);
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 /** 118 /**
119 * Native JNI call 119 * Native JNI call
120 * see content/browser/battery_status/battery_status_manager_android.cc 120 * see content/browser/battery_status/battery_status_manager.cc
121 */ 121 */
122 private native void nativeGotBatteryStatus(long nativeBatteryStatusManagerAn droid, 122 private native void nativeGotBatteryStatus(long nativeBatteryStatusManager,
123 boolean charging, double chargingTime, double dischargingTime, doubl e level); 123 boolean charging, double chargingTime, double dischargingTime, doubl e level);
124 } 124 }
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698