| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 5 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host.h" | 8 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 instances_[render_view_host] = instance; | 64 instances_[render_view_host] = instance; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void JavaBridgeDispatcherHostManager::RenderViewDeleted( | 67 void JavaBridgeDispatcherHostManager::RenderViewDeleted( |
| 68 RenderViewHost* render_view_host) { | 68 RenderViewHost* render_view_host) { |
| 69 instances_.erase(render_view_host); | 69 instances_.erase(render_view_host); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void JavaBridgeDispatcherHostManager::WebContentsDestroyed( | 72 void JavaBridgeDispatcherHostManager::WebContentsDestroyed( |
| 73 content::WebContents* web_contents) { | 73 content::WebContents* web_contents) { |
| 74 // When the tab is shutting down, the WebContents clears its observers before | 74 // When a WebContents is shutting down, it clears its observers before |
| 75 // it kills all of its RenderViewHosts, so we won't get a call to | 75 // it kills all of its RenderViewHosts, so we won't get a call to |
| 76 // RenderViewDeleted() for all RenderViewHosts. | 76 // RenderViewDeleted() for all RenderViewHosts. |
| 77 instances_.clear(); | 77 instances_.clear(); |
| 78 } | 78 } |
| OLD | NEW |