Index: content/browser/android/java/gin_java_bridge_dispatcher_host.cc |
diff --git a/content/browser/android/java/gin_java_bridge_dispatcher_host.cc b/content/browser/android/java/gin_java_bridge_dispatcher_host.cc |
index 5063273c85ed3ebf7b3db57ea0c2347d6b8921a7..2de4f9fef0fb27a92251c5c0880c8b021f22214a 100644 |
--- a/content/browser/android/java/gin_java_bridge_dispatcher_host.cc |
+++ b/content/browser/android/java/gin_java_bridge_dispatcher_host.cc |
@@ -80,6 +80,20 @@ void GinJavaBridgeDispatcherHost::WebContentsDestroyed() { |
filter->RemoveHost(this); |
} |
+void GinJavaBridgeDispatcherHost::RenderProcessGone( |
+ base::TerminationStatus status) { |
+ GinJavaBridgeMessageFilter::RemoveFilter(this); |
+} |
+ |
+void GinJavaBridgeDispatcherHost::RenderViewHostChanged( |
+ RenderViewHost* old_host, |
+ RenderViewHost* new_host) { |
+ scoped_refptr<GinJavaBridgeMessageFilter> filter = |
+ GinJavaBridgeMessageFilter::FromHost(this, false); |
+ if (!filter) |
+ InstallFilterAndRegisterAllRoutingIds(); |
+} |
+ |
GinJavaBoundObject::ObjectID GinJavaBridgeDispatcherHost::AddObject( |
const base::android::JavaRef<jobject>& object, |
const base::android::JavaRef<jclass>& safe_annotation_clazz, |