| OLD | NEW |
| 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.content.browser.InterfaceRegistry; | 10 import org.chromium.content.browser.InterfaceRegistry; |
| 10 import org.chromium.content_public.browser.WebContents; | 11 import org.chromium.content_public.browser.WebContents; |
| 11 import org.chromium.mojom.payments.PaymentRequest; | 12 import org.chromium.mojom.payments.PaymentRequest; |
| 13 import org.chromium.mojom.webshare.ShareService; |
| 12 | 14 |
| 13 /** | 15 /** |
| 14 * Registers interfaces exposed by Chrome in the given registry. | 16 * Registers interfaces exposed by Chrome in the given registry. |
| 15 */ | 17 */ |
| 16 class ChromeInterfaceRegistrar { | 18 class ChromeInterfaceRegistrar { |
| 17 @CalledByNative | 19 @CalledByNative |
| 18 private static void exposeInterfacesToFrame( | 20 private static void exposeInterfacesToFrame( |
| 19 InterfaceRegistry registry, WebContents webContents) { | 21 InterfaceRegistry registry, WebContents webContents) { |
| 20 registry.addInterface(PaymentRequest.MANAGER, new PaymentRequestFactory(
webContents)); | 22 registry.addInterface(PaymentRequest.MANAGER, new PaymentRequestFactory(
webContents)); |
| 23 registry.addInterface( |
| 24 ShareService.MANAGER, new ShareServiceImplementationFactory(webC
ontents)); |
| 21 } | 25 } |
| 22 } | 26 } |
| OLD | NEW |