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

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

Issue 2643713002: Port BatteryMonitor into Device Service (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « content/public/android/BUILD.gn ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.annotations.CalledByNative; 9 import org.chromium.base.annotations.CalledByNative;
10 import org.chromium.base.annotations.JNINamespace; 10 import org.chromium.base.annotations.JNINamespace;
11 import org.chromium.content.browser.androidoverlay.AndroidOverlayProviderImpl; 11 import org.chromium.content.browser.androidoverlay.AndroidOverlayProviderImpl;
12 import org.chromium.content.browser.installedapp.InstalledAppProviderFactory; 12 import org.chromium.content.browser.installedapp.InstalledAppProviderFactory;
13 import org.chromium.content.browser.shapedetection.FaceDetectionProviderImpl; 13 import org.chromium.content.browser.shapedetection.FaceDetectionProviderImpl;
14 import org.chromium.content_public.browser.InterfaceRegistrar; 14 import org.chromium.content_public.browser.InterfaceRegistrar;
15 import org.chromium.content_public.browser.RenderFrameHost; 15 import org.chromium.content_public.browser.RenderFrameHost;
16 import org.chromium.content_public.browser.WebContents; 16 import org.chromium.content_public.browser.WebContents;
17 import org.chromium.device.BatteryMonitor;
18 import org.chromium.device.battery.BatteryMonitorFactory;
19 import org.chromium.device.mojom.VibrationManager; 17 import org.chromium.device.mojom.VibrationManager;
20 import org.chromium.device.nfc.mojom.Nfc; 18 import org.chromium.device.nfc.mojom.Nfc;
21 import org.chromium.device.vibration.VibrationManagerImpl; 19 import org.chromium.device.vibration.VibrationManagerImpl;
22 import org.chromium.installedapp.mojom.InstalledAppProvider; 20 import org.chromium.installedapp.mojom.InstalledAppProvider;
23 import org.chromium.media.mojom.AndroidOverlayProvider; 21 import org.chromium.media.mojom.AndroidOverlayProvider;
24 import org.chromium.mojo.system.impl.CoreImpl; 22 import org.chromium.mojo.system.impl.CoreImpl;
25 import org.chromium.services.service_manager.InterfaceRegistry; 23 import org.chromium.services.service_manager.InterfaceRegistry;
26 import org.chromium.shape_detection.mojom.FaceDetectionProvider; 24 import org.chromium.shape_detection.mojom.FaceDetectionProvider;
27 25
28 @JNINamespace("content") 26 @JNINamespace("content")
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 InterfaceRegistrar.Registry.addRenderFrameHostRegistrar( 65 InterfaceRegistrar.Registry.addRenderFrameHostRegistrar(
68 new ContentRenderFrameHostInterfaceRegistrar()); 66 new ContentRenderFrameHostInterfaceRegistrar());
69 } 67 }
70 68
71 private static class ContentContextInterfaceRegistrar implements InterfaceRe gistrar<Context> { 69 private static class ContentContextInterfaceRegistrar implements InterfaceRe gistrar<Context> {
72 @Override 70 @Override
73 public void registerInterfaces( 71 public void registerInterfaces(
74 InterfaceRegistry registry, final Context applicationContext) { 72 InterfaceRegistry registry, final Context applicationContext) {
75 registry.addInterface( 73 registry.addInterface(
76 VibrationManager.MANAGER, new VibrationManagerImpl.Factory(a pplicationContext)); 74 VibrationManager.MANAGER, new VibrationManagerImpl.Factory(a pplicationContext));
77 registry.addInterface(
78 BatteryMonitor.MANAGER, new BatteryMonitorFactory(applicatio nContext));
79 registry.addInterface(FaceDetectionProvider.MANAGER, 75 registry.addInterface(FaceDetectionProvider.MANAGER,
80 new FaceDetectionProviderImpl.Factory(applicationContext)); 76 new FaceDetectionProviderImpl.Factory(applicationContext));
81 registry.addInterface(AndroidOverlayProvider.MANAGER, 77 registry.addInterface(AndroidOverlayProvider.MANAGER,
82 new AndroidOverlayProviderImpl.Factory(applicationContext)); 78 new AndroidOverlayProviderImpl.Factory(applicationContext));
83 // TODO(avayvod): Register the PresentationService implementation he re. 79 // TODO(avayvod): Register the PresentationService implementation he re.
84 } 80 }
85 } 81 }
86 82
87 private static class ContentWebContentsInterfaceRegistrar 83 private static class ContentWebContentsInterfaceRegistrar
88 implements InterfaceRegistrar<WebContents> { 84 implements InterfaceRegistrar<WebContents> {
89 @Override 85 @Override
90 public void registerInterfaces(InterfaceRegistry registry, final WebCont ents webContents) { 86 public void registerInterfaces(InterfaceRegistry registry, final WebCont ents webContents) {
91 registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents)); 87 registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents));
92 } 88 }
93 } 89 }
94 90
95 private static class ContentRenderFrameHostInterfaceRegistrar 91 private static class ContentRenderFrameHostInterfaceRegistrar
96 implements InterfaceRegistrar<RenderFrameHost> { 92 implements InterfaceRegistrar<RenderFrameHost> {
97 @Override 93 @Override
98 public void registerInterfaces( 94 public void registerInterfaces(
99 InterfaceRegistry registry, final RenderFrameHost renderFrameHos t) { 95 InterfaceRegistry registry, final RenderFrameHost renderFrameHos t) {
100 registry.addInterface( 96 registry.addInterface(
101 InstalledAppProvider.MANAGER, new InstalledAppProviderFactor y(renderFrameHost)); 97 InstalledAppProvider.MANAGER, new InstalledAppProviderFactor y(renderFrameHost));
102 } 98 }
103 } 99 }
104 } 100 }
OLDNEW
« no previous file with comments | « content/public/android/BUILD.gn ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698