| 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/logging.h" |
| 7 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 8 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host.h" | 9 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
| 10 | 11 |
| 11 using content::RenderViewHost; | 12 using content::RenderViewHost; |
| 12 | 13 |
| 13 JavaBridgeDispatcherHostManager::JavaBridgeDispatcherHostManager( | 14 JavaBridgeDispatcherHostManager::JavaBridgeDispatcherHostManager( |
| 14 content::WebContents* web_contents) | 15 content::WebContents* web_contents) |
| 15 : content::WebContentsObserver(web_contents) { | 16 : content::WebContentsObserver(web_contents) { |
| 16 } | 17 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 instances_.erase(render_view_host); | 74 instances_.erase(render_view_host); |
| 74 } | 75 } |
| 75 | 76 |
| 76 void JavaBridgeDispatcherHostManager::WebContentsDestroyed( | 77 void JavaBridgeDispatcherHostManager::WebContentsDestroyed( |
| 77 content::WebContents* web_contents) { | 78 content::WebContents* web_contents) { |
| 78 // When a WebContents is shutting down, it clears its observers before | 79 // When a WebContents is shutting down, it clears its observers before |
| 79 // it kills all of its RenderViewHosts, so we won't get a call to | 80 // it kills all of its RenderViewHosts, so we won't get a call to |
| 80 // RenderViewDeleted() for all RenderViewHosts. | 81 // RenderViewDeleted() for all RenderViewHosts. |
| 81 instances_.clear(); | 82 instances_.clear(); |
| 82 } | 83 } |
| OLD | NEW |