OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/debugger/devtools_manager.h" | 5 #include "chrome/browser/debugger/devtools_manager.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 const GURL& gurl) { | 214 const GURL& gurl) { |
215 if (in_initial_show_) { | 215 if (in_initial_show_) { |
216 // Mute this even in case it is caused by the initial show routines. | 216 // Mute this even in case it is caused by the initial show routines. |
217 return; | 217 return; |
218 } | 218 } |
219 | 219 |
220 int cookie = DetachClientHost(rvh); | 220 int cookie = DetachClientHost(rvh); |
221 if (cookie != -1) { | 221 if (cookie != -1) { |
222 // Navigating to URL in the inspected window. | 222 // Navigating to URL in the inspected window. |
223 AttachClientHost(cookie, dest_rvh); | 223 AttachClientHost(cookie, dest_rvh); |
| 224 |
| 225 DevToolsClientHost* client_host = GetDevToolsClientHostFor(dest_rvh); |
| 226 client_host->FrameNavigating(gurl.spec()); |
| 227 |
224 return; | 228 return; |
225 } | 229 } |
226 | 230 |
227 // Iterate over client hosts and if there is one that has render view host | 231 // Iterate over client hosts and if there is one that has render view host |
228 // changing, reopen entire client window (this must be caused by the user | 232 // changing, reopen entire client window (this must be caused by the user |
229 // manually refreshing its content). | 233 // manually refreshing its content). |
230 for (ClientHostToInspectedRvhMap::iterator it = | 234 for (ClientHostToInspectedRvhMap::iterator it = |
231 client_host_to_inspected_rvh_.begin(); | 235 client_host_to_inspected_rvh_.begin(); |
232 it != client_host_to_inspected_rvh_.end(); ++it) { | 236 it != client_host_to_inspected_rvh_.end(); ++it) { |
233 DevToolsWindow* window = it->first->AsDevToolsWindow(); | 237 DevToolsWindow* window = it->first->AsDevToolsWindow(); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 for (InspectedRvhToClientHostMap::iterator it = | 425 for (InspectedRvhToClientHostMap::iterator it = |
422 inspected_rvh_to_client_host_.begin(); | 426 inspected_rvh_to_client_host_.begin(); |
423 it != inspected_rvh_to_client_host_.end(); ++it) { | 427 it != inspected_rvh_to_client_host_.end(); ++it) { |
424 rhvs.push_back(it->first); | 428 rhvs.push_back(it->first); |
425 } | 429 } |
426 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); | 430 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); |
427 it != rhvs.end(); ++it) { | 431 it != rhvs.end(); ++it) { |
428 UnregisterDevToolsClientHostFor(*it); | 432 UnregisterDevToolsClientHostFor(*it); |
429 } | 433 } |
430 } | 434 } |
OLD | NEW |