Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |