| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/debugger/devtools_manager.h" | 5 #include "content/browser/debugger/devtools_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 if (it->second.first == host) { | 115 if (it->second.first == host) { |
| 116 orphan_client_hosts_.erase(it->first); | 116 orphan_client_hosts_.erase(it->first); |
| 117 return; | 117 return; |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 return; | 120 return; |
| 121 } | 121 } |
| 122 | 122 |
| 123 NotificationService::current()->Notify( | 123 NotificationService::current()->Notify( |
| 124 content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, | 124 content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, |
| 125 Source<content::BrowserContext>( | 125 Source<Profile>(inspected_rvh->site_instance()->GetProcess()->profile()), |
| 126 inspected_rvh->site_instance()->GetProcess()->browser_context()), | |
| 127 Details<RenderViewHost>(inspected_rvh)); | 126 Details<RenderViewHost>(inspected_rvh)); |
| 128 | 127 |
| 129 UnbindClientHost(inspected_rvh, host); | 128 UnbindClientHost(inspected_rvh, host); |
| 130 } | 129 } |
| 131 | 130 |
| 132 void DevToolsManager::Observe(int type, | 131 void DevToolsManager::Observe(int type, |
| 133 const NotificationSource& source, | 132 const NotificationSource& source, |
| 134 const NotificationDetails& details) { | 133 const NotificationDetails& details) { |
| 135 DCHECK(type == content::NOTIFICATION_RENDER_VIEW_HOST_DELETED); | 134 DCHECK(type == content::NOTIFICATION_RENDER_VIEW_HOST_DELETED); |
| 136 UnregisterDevToolsClientHostFor(Source<RenderViewHost>(source).ptr()); | 135 UnregisterDevToolsClientHostFor(Source<RenderViewHost>(source).ptr()); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 for (InspectedRvhToClientHostMap::iterator it = | 289 for (InspectedRvhToClientHostMap::iterator it = |
| 291 inspected_rvh_to_client_host_.begin(); | 290 inspected_rvh_to_client_host_.begin(); |
| 292 it != inspected_rvh_to_client_host_.end(); ++it) { | 291 it != inspected_rvh_to_client_host_.end(); ++it) { |
| 293 rhvs.push_back(it->first); | 292 rhvs.push_back(it->first); |
| 294 } | 293 } |
| 295 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); | 294 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); |
| 296 it != rhvs.end(); ++it) { | 295 it != rhvs.end(); ++it) { |
| 297 UnregisterDevToolsClientHostFor(*it); | 296 UnregisterDevToolsClientHostFor(*it); |
| 298 } | 297 } |
| 299 } | 298 } |
| OLD | NEW |