Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: content/browser/debugger/devtools_manager.cc

Issue 7565008: DevTools: don't show the unresponsive dialog for inspected tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed the test Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 int cookie = DetachClientHost(rvh); 160 int cookie = DetachClientHost(rvh);
161 if (cookie != -1) { 161 if (cookie != -1) {
162 // Navigating to URL in the inspected window. 162 // Navigating to URL in the inspected window.
163 AttachClientHost(cookie, dest_rvh); 163 AttachClientHost(cookie, dest_rvh);
164 164
165 DevToolsClientHost* client_host = GetDevToolsClientHostFor(dest_rvh); 165 DevToolsClientHost* client_host = GetDevToolsClientHostFor(dest_rvh);
166 client_host->FrameNavigating(gurl.spec()); 166 client_host->FrameNavigating(gurl.spec());
167 } 167 }
168 } 168 }
169 169
170 bool DevToolsManager::IsBeingDebugged(RenderViewHost* inspected_rvh) {
171 return inspected_rvh_to_client_host_.find(inspected_rvh) !=
172 inspected_rvh_to_client_host_.end();
173 }
174
170 void DevToolsManager::TabReplaced(TabContents* old_tab, 175 void DevToolsManager::TabReplaced(TabContents* old_tab,
171 TabContents* new_tab) { 176 TabContents* new_tab) {
172 RenderViewHost* old_rvh = old_tab->render_view_host(); 177 RenderViewHost* old_rvh = old_tab->render_view_host();
173 DevToolsClientHost* client_host = GetDevToolsClientHostFor(old_rvh); 178 DevToolsClientHost* client_host = GetDevToolsClientHostFor(old_rvh);
174 if (!client_host) 179 if (!client_host)
175 return; // Didn't know about old_tab. 180 return; // Didn't know about old_tab.
176 int cookie = DetachClientHost(old_rvh); 181 int cookie = DetachClientHost(old_rvh);
177 if (cookie == -1) 182 if (cookie == -1)
178 return; // Didn't know about old_tab. 183 return; // Didn't know about old_tab.
179 184
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 for (InspectedRvhToClientHostMap::iterator it = 295 for (InspectedRvhToClientHostMap::iterator it =
291 inspected_rvh_to_client_host_.begin(); 296 inspected_rvh_to_client_host_.begin();
292 it != inspected_rvh_to_client_host_.end(); ++it) { 297 it != inspected_rvh_to_client_host_.end(); ++it) {
293 rhvs.push_back(it->first); 298 rhvs.push_back(it->first);
294 } 299 }
295 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); 300 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin();
296 it != rhvs.end(); ++it) { 301 it != rhvs.end(); ++it) {
297 UnregisterDevToolsClientHostFor(*it); 302 UnregisterDevToolsClientHostFor(*it);
298 } 303 }
299 } 304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698