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

Side by Side Diff: services/device/android/java/src/org/chromium/services/device/InterfaceRegistrar.java

Issue 2643713002: Port BatteryMonitor into Device Service (Closed)
Patch Set: Self-review Created 3 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
Sam McNally 2017/01/25 05:53:06 2017
blundell 2017/01/25 15:00:34 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.device_service;
6
7 import android.content.Context;
8
9 import org.chromium.base.annotations.CalledByNative;
10 import org.chromium.base.annotations.JNINamespace;
11 import org.chromium.device.BatteryMonitor;
12 import org.chromium.device.battery.BatteryMonitorFactory;
13 import org.chromium.mojo.system.impl.CoreImpl;
14 import org.chromium.services.service_manager.InterfaceRegistry;
15
16 @JNINamespace("device")
17 class InterfaceRegistrar {
18 @CalledByNative
19 static InterfaceRegistry createInterfaceRegistryForContext(
Sam McNally 2017/01/25 05:53:06 Return void.
blundell 2017/01/25 15:00:34 Done.
20 int nativeHandle, Context applicationContext) {
21 InterfaceRegistry registry = InterfaceRegistry.create(
22 CoreImpl.getInstance().acquireNativeHandle(nativeHandle).toMessa gePipeHandle());
23 registry.addInterface(
24 BatteryMonitor.MANAGER, new BatteryMonitorFactory(applicationCon text));
blundell 2017/01/24 11:35:43 I originally thought I would generalize this code
25 return registry;
26 }
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698