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

Unified Diff: device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java

Issue 2214383002: Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: fix vr_shell build Created 4 years, 3 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 | « device/battery/android/BUILD.gn ('k') | device/vibration/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java
diff --git a/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java b/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java
index 9e890060ec1ceafe3e7b745328ff1585a5ed79a8..34109564ab474f72f692e7d995fac8cef4ead828 100644
--- a/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java
+++ b/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java
@@ -11,6 +11,7 @@ import org.chromium.base.ThreadUtils;
import org.chromium.device.BatteryMonitor;
import org.chromium.device.BatteryStatus;
import org.chromium.device.battery.BatteryStatusManager.BatteryStatusCallback;
+import org.chromium.services.shell.InterfaceFactory;
import java.util.HashSet;
@@ -18,7 +19,7 @@ import java.util.HashSet;
* Factory that creates instances of BatteryMonitor implementations and notifies them about battery
* status changes.
*/
-public class BatteryMonitorFactory {
+public class BatteryMonitorFactory implements InterfaceFactory<BatteryMonitor> {
static final String TAG = "BatteryMonitorFactory";
// Backing source of battery information.
@@ -43,7 +44,8 @@ public class BatteryMonitorFactory {
mManager = new BatteryStatusManager(applicationContext, mCallback);
}
- public BatteryMonitor createMonitor() {
+ @Override
+ public BatteryMonitor createImpl() {
ThreadUtils.assertOnUiThread();
if (mSubscribedMonitors.isEmpty() && !mManager.start()) {
« no previous file with comments | « device/battery/android/BUILD.gn ('k') | device/vibration/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698