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

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

Issue 2688193002: Mojo framework for AndroidOverlay. (Closed)
Patch Set: fixed mojo manifest bug introduced by 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
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.shapedetection.FaceDetectionProviderImpl; 12 import org.chromium.content.browser.shapedetection.FaceDetectionProviderImpl;
12 import org.chromium.content_public.browser.InterfaceRegistrar; 13 import org.chromium.content_public.browser.InterfaceRegistrar;
13 import org.chromium.content_public.browser.RenderFrameHost; 14 import org.chromium.content_public.browser.RenderFrameHost;
14 import org.chromium.content_public.browser.WebContents; 15 import org.chromium.content_public.browser.WebContents;
15 import org.chromium.device.BatteryMonitor; 16 import org.chromium.device.BatteryMonitor;
16 import org.chromium.device.battery.BatteryMonitorFactory; 17 import org.chromium.device.battery.BatteryMonitorFactory;
17 import org.chromium.device.mojom.VibrationManager; 18 import org.chromium.device.mojom.VibrationManager;
18 import org.chromium.device.nfc.mojom.Nfc; 19 import org.chromium.device.nfc.mojom.Nfc;
19 import org.chromium.device.vibration.VibrationManagerImpl; 20 import org.chromium.device.vibration.VibrationManagerImpl;
21 import org.chromium.media.mojom.AndroidOverlayProvider;
20 import org.chromium.mojo.system.impl.CoreImpl; 22 import org.chromium.mojo.system.impl.CoreImpl;
21 import org.chromium.services.service_manager.InterfaceRegistry; 23 import org.chromium.services.service_manager.InterfaceRegistry;
22 import org.chromium.shape_detection.mojom.FaceDetectionProvider; 24 import org.chromium.shape_detection.mojom.FaceDetectionProvider;
23 25
24 @JNINamespace("content") 26 @JNINamespace("content")
25 class InterfaceRegistrarImpl { 27 class InterfaceRegistrarImpl {
26 28
27 private static boolean sHasRegisteredRegistrars; 29 private static boolean sHasRegisteredRegistrars;
28 30
29 @CalledByNative 31 @CalledByNative
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 private static class ContentContextInterfaceRegistrar implements InterfaceRe gistrar<Context> { 67 private static class ContentContextInterfaceRegistrar implements InterfaceRe gistrar<Context> {
66 @Override 68 @Override
67 public void registerInterfaces( 69 public void registerInterfaces(
68 InterfaceRegistry registry, final Context applicationContext) { 70 InterfaceRegistry registry, final Context applicationContext) {
69 registry.addInterface( 71 registry.addInterface(
70 VibrationManager.MANAGER, new VibrationManagerImpl.Factory(a pplicationContext)); 72 VibrationManager.MANAGER, new VibrationManagerImpl.Factory(a pplicationContext));
71 registry.addInterface( 73 registry.addInterface(
72 BatteryMonitor.MANAGER, new BatteryMonitorFactory(applicatio nContext)); 74 BatteryMonitor.MANAGER, new BatteryMonitorFactory(applicatio nContext));
73 registry.addInterface(FaceDetectionProvider.MANAGER, 75 registry.addInterface(FaceDetectionProvider.MANAGER,
74 new FaceDetectionProviderImpl.Factory(applicationContext)); 76 new FaceDetectionProviderImpl.Factory(applicationContext));
77 registry.addInterface(AndroidOverlayProvider.MANAGER,
78 new AndroidOverlayProviderImpl.Factory(applicationContext));
75 // TODO(avayvod): Register the PresentationService implementation he re. 79 // TODO(avayvod): Register the PresentationService implementation he re.
76 } 80 }
77 } 81 }
78 82
79 private static class ContentWebContentsInterfaceRegistrar 83 private static class ContentWebContentsInterfaceRegistrar
80 implements InterfaceRegistrar<WebContents> { 84 implements InterfaceRegistrar<WebContents> {
81 @Override 85 @Override
82 public void registerInterfaces(InterfaceRegistry registry, final WebCont ents webContents) { 86 public void registerInterfaces(InterfaceRegistry registry, final WebCont ents webContents) {
83 registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents)); 87 registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents));
84 } 88 }
85 } 89 }
86 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698