Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: content/browser/android/java/gin_java_bridge_dispatcher_host.cc

Issue 1547043002: [Android] Fix GinJavaBridgeMessageFilter registration issue in Java Bridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses review inputs. Created 5 years 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698