| 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/browsing_instance.h" | 10 #include "content/browser/browsing_instance.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 DevToolsClientHost* client_host = GetDevToolsClientHostFor(agent_host); | 139 DevToolsClientHost* client_host = GetDevToolsClientHostFor(agent_host); |
| 140 if (!client_host) | 140 if (!client_host) |
| 141 return; | 141 return; |
| 142 UnbindClientHost(agent_host, client_host); | 142 UnbindClientHost(agent_host, client_host); |
| 143 client_host->InspectedTabClosing(); | 143 client_host->InspectedTabClosing(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void DevToolsManager::OnNavigatingToPendingEntry(RenderViewHost* rvh, | 146 void DevToolsManager::OnNavigatingToPendingEntry(RenderViewHost* rvh, |
| 147 RenderViewHost* dest_rvh, | 147 RenderViewHost* dest_rvh, |
| 148 const GURL& gurl) { | 148 const GURL& gurl) { |
| 149 if (rvh == dest_rvh) | 149 if (rvh == dest_rvh && rvh->render_view_termination_status() == |
| 150 base::TERMINATION_STATUS_STILL_RUNNING) |
| 150 return; | 151 return; |
| 151 int cookie = DetachClientHost(rvh); | 152 int cookie = DetachClientHost(rvh); |
| 152 if (cookie != -1) { | 153 if (cookie != -1) { |
| 153 // Navigating to URL in the inspected window. | 154 // Navigating to URL in the inspected window. |
| 154 AttachClientHost(cookie, dest_rvh); | 155 AttachClientHost(cookie, dest_rvh); |
| 155 | 156 |
| 156 DevToolsClientHost* client_host = GetDevToolsClientHostFor(dest_rvh); | 157 DevToolsClientHost* client_host = GetDevToolsClientHostFor(dest_rvh); |
| 157 client_host->FrameNavigating(gurl.spec()); | 158 client_host->FrameNavigating(gurl.spec()); |
| 158 } | 159 } |
| 159 } | 160 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 for (AgentToClientHostMap::iterator it = | 278 for (AgentToClientHostMap::iterator it = |
| 278 agent_to_client_host_.begin(); | 279 agent_to_client_host_.begin(); |
| 279 it != agent_to_client_host_.end(); ++it) { | 280 it != agent_to_client_host_.end(); ++it) { |
| 280 agents.push_back(it->first); | 281 agents.push_back(it->first); |
| 281 } | 282 } |
| 282 for (std::vector<DevToolsAgentHost*>::iterator it = agents.begin(); | 283 for (std::vector<DevToolsAgentHost*>::iterator it = agents.begin(); |
| 283 it != agents.end(); ++it) { | 284 it != agents.end(); ++it) { |
| 284 UnregisterDevToolsClientHostFor(*it); | 285 UnregisterDevToolsClientHostFor(*it); |
| 285 } | 286 } |
| 286 } | 287 } |
| OLD | NEW |