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: chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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.chrome.browser.mojo; 5 package org.chromium.chrome.browser.mojo;
6 6
7 import org.chromium.base.annotations.CalledByNative; 7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.chrome.browser.payments.PaymentRequestFactory; 8 import org.chromium.chrome.browser.payments.PaymentRequestFactory;
9 import org.chromium.chrome.browser.webshare.ShareServiceImplementationFactory; 9 import org.chromium.chrome.browser.webshare.ShareServiceImplementationFactory;
10 import org.chromium.content_public.browser.InterfaceRegistrar; 10 import org.chromium.content_public.browser.InterfaceRegistrar;
11 import org.chromium.content_public.browser.WebContents; 11 import org.chromium.content_public.browser.WebContents;
12 import org.chromium.payments.mojom.PaymentRequest; 12 import org.chromium.payments.mojom.PaymentRequest;
13 import org.chromium.services.shell.InterfaceRegistry; 13 import org.chromium.services.service_manager.InterfaceRegistry;
14 import org.chromium.webshare.mojom.ShareService; 14 import org.chromium.webshare.mojom.ShareService;
15 15
16 /** Registers mojo interface implementations exposed to C++ code at the Chrome l ayer. */ 16 /** Registers mojo interface implementations exposed to C++ code at the Chrome l ayer. */
17 class ChromeInterfaceRegistrar { 17 class ChromeInterfaceRegistrar {
18 @CalledByNative 18 @CalledByNative
19 private static void registerMojoInterfaces() { 19 private static void registerMojoInterfaces() {
20 InterfaceRegistrar.Registry.addWebContentsRegistrar( 20 InterfaceRegistrar.Registry.addWebContentsRegistrar(
21 new ChromeWebContentsInterfaceRegistrar()); 21 new ChromeWebContentsInterfaceRegistrar());
22 } 22 }
23 } 23 }
24 24
25 class ChromeWebContentsInterfaceRegistrar implements InterfaceRegistrar<WebConte nts> { 25 class ChromeWebContentsInterfaceRegistrar implements InterfaceRegistrar<WebConte nts> {
26 @Override 26 @Override
27 public void registerInterfaces(InterfaceRegistry registry, final WebContents webContents) { 27 public void registerInterfaces(InterfaceRegistry registry, final WebContents webContents) {
28 registry.addInterface(PaymentRequest.MANAGER, new PaymentRequestFactory( webContents)); 28 registry.addInterface(PaymentRequest.MANAGER, new PaymentRequestFactory( webContents));
29 registry.addInterface( 29 registry.addInterface(
30 ShareService.MANAGER, new ShareServiceImplementationFactory(webC ontents)); 30 ShareService.MANAGER, new ShareServiceImplementationFactory(webC ontents));
31 } 31 }
32 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698