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

Side by Side Diff: content/browser/android/java/gin_java_bridge_message_filter.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 mnaganov's inputs. Created 4 years, 11 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "content/browser/android/java/gin_java_bridge_message_filter.h" 5 #include "content/browser/android/java/gin_java_bridge_message_filter.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" 9 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h"
10 #include "content/browser/android/java/java_bridge_thread.h" 10 #include "content/browser/android/java/java_bridge_thread.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 void GinJavaBridgeMessageFilter::OnObjectWrapperDeleted( 163 void GinJavaBridgeMessageFilter::OnObjectWrapperDeleted(
164 GinJavaBoundObject::ObjectID object_id) { 164 GinJavaBoundObject::ObjectID object_id) {
165 DCHECK(JavaBridgeThread::CurrentlyOn()); 165 DCHECK(JavaBridgeThread::CurrentlyOn());
166 GinJavaBridgeDispatcherHost* host = FindHost(); 166 GinJavaBridgeDispatcherHost* host = FindHost();
167 if (host) 167 if (host)
168 host->OnObjectWrapperDeleted(current_routing_id_, object_id); 168 host->OnObjectWrapperDeleted(current_routing_id_, object_id);
169 } 169 }
170 170
171 void GinJavaBridgeMessageFilter::RemoveUserData(
172 const GinJavaBridgeDispatcherHost* host) {
173 DCHECK(host);
mnaganov (inactive) 2015/12/29 16:55:28 DCHECK is not needed here, filter's only client is
Pritam Nikam 2015/12/30 12:05:36 Done.
174 RenderProcessHost* rph = host->web_contents()->GetRenderProcessHost();
175 DCHECK(rph);
mnaganov (inactive) 2015/12/29 16:55:28 This DCHECK is also not needed because would `rph`
Pritam Nikam 2015/12/30 12:05:36 Done.
176 rph->RemoveUserData(kGinJavaBridgeMessageFilterKey);
177 }
178
171 } // namespace content 179 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698