Index: content/public/android/java/src/org/chromium/content_public/browser/InterfaceRegistrar.java |
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/InterfaceRegistrar.java b/content/public/android/java/src/org/chromium/content_public/browser/InterfaceRegistrar.java |
index 45b3ffe0f44d27d09f35fc5521ddc5c49f516012..131260b41b5413ba3e3b0c3d611cec48e3d5aeee 100644 |
--- a/content/public/android/java/src/org/chromium/content_public/browser/InterfaceRegistrar.java |
+++ b/content/public/android/java/src/org/chromium/content_public/browser/InterfaceRegistrar.java |
@@ -25,6 +25,7 @@ public interface InterfaceRegistrar<ParamType> { |
public static class Registry<ParamType> { |
private static Registry<Context> sContextRegistry; |
private static Registry<WebContents> sWebContentsRegistry; |
+ private static Registry<RenderFrameHost> sRenderFrameHostRegistry; |
private List<InterfaceRegistrar<ParamType>> mRegistrars = |
new ArrayList<InterfaceRegistrar<ParamType>>(); |
@@ -45,6 +46,14 @@ public interface InterfaceRegistrar<ParamType> { |
sWebContentsRegistry.applyRegistrars(interfaceRegistry, webContents); |
} |
+ public static void applyRenderFrameHostRegistrars( |
+ InterfaceRegistry interfaceRegistry, RenderFrameHost renderFrameHost) { |
+ if (sRenderFrameHostRegistry == null) { |
+ return; |
+ } |
+ sRenderFrameHostRegistry.applyRegistrars(interfaceRegistry, renderFrameHost); |
+ } |
+ |
public static void addContextRegistrar(InterfaceRegistrar<Context> registrar) { |
if (sContextRegistry == null) { |
sContextRegistry = new Registry<Context>(); |
@@ -59,6 +68,14 @@ public interface InterfaceRegistrar<ParamType> { |
sWebContentsRegistry.addRegistrar(registrar); |
} |
+ public static void addRenderFrameHostRegistrar( |
+ InterfaceRegistrar<RenderFrameHost> registrar) { |
+ if (sRenderFrameHostRegistry == null) { |
+ sRenderFrameHostRegistry = new Registry<RenderFrameHost>(); |
+ } |
+ sRenderFrameHostRegistry.addRegistrar(registrar); |
+ } |
+ |
private Registry() {} |
private void addRegistrar(InterfaceRegistrar<ParamType> registrar) { |