| 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.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; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 registry.addInterface(AndroidOverlayProvider.MANAGER, | 73 registry.addInterface(AndroidOverlayProvider.MANAGER, |
| 74 new AndroidOverlayProviderImpl.Factory(applicationContext)); | 74 new AndroidOverlayProviderImpl.Factory(applicationContext)); |
| 75 // TODO(avayvod): Register the PresentationService implementation he
re. | 75 // TODO(avayvod): Register the PresentationService implementation he
re. |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 private static class ContentWebContentsInterfaceRegistrar | 79 private static class ContentWebContentsInterfaceRegistrar |
| 80 implements InterfaceRegistrar<WebContents> { | 80 implements InterfaceRegistrar<WebContents> { |
| 81 @Override | 81 @Override |
| 82 public void registerInterfaces(InterfaceRegistry registry, final WebCont
ents webContents) { | 82 public void registerInterfaces(InterfaceRegistry registry, final WebCont
ents webContents) { |
| 83 registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents)); | 83 if (ContentFeatureList.isEnabled(ContentFeatureList.WEB_NFC)) { |
| 84 registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents)); |
| 85 } |
| 84 } | 86 } |
| 85 } | 87 } |
| 86 | 88 |
| 87 private static class ContentRenderFrameHostInterfaceRegistrar | 89 private static class ContentRenderFrameHostInterfaceRegistrar |
| 88 implements InterfaceRegistrar<RenderFrameHost> { | 90 implements InterfaceRegistrar<RenderFrameHost> { |
| 89 @Override | 91 @Override |
| 90 public void registerInterfaces( | 92 public void registerInterfaces( |
| 91 InterfaceRegistry registry, final RenderFrameHost renderFrameHos
t) { | 93 InterfaceRegistry registry, final RenderFrameHost renderFrameHos
t) { |
| 92 registry.addInterface( | 94 registry.addInterface( |
| 93 InstalledAppProvider.MANAGER, new InstalledAppProviderFactor
y(renderFrameHost)); | 95 InstalledAppProvider.MANAGER, new InstalledAppProviderFactor
y(renderFrameHost)); |
| 94 } | 96 } |
| 95 } | 97 } |
| 96 } | 98 } |
| OLD | NEW |