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

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

Issue 7309011: Remove dependencies on extensions from content/browser/debugger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 void DevToolsManager::ToggleDevToolsWindow( 366 void DevToolsManager::ToggleDevToolsWindow(
367 RenderViewHost* inspected_rvh, 367 RenderViewHost* inspected_rvh,
368 bool force_open, 368 bool force_open,
369 DevToolsToggleAction action) { 369 DevToolsToggleAction action) {
370 bool do_open = force_open; 370 bool do_open = force_open;
371 DevToolsClientHost* host = GetDevToolsClientHostFor(inspected_rvh); 371 DevToolsClientHost* host = GetDevToolsClientHostFor(inspected_rvh);
372 372
373 if (host != NULL && host->AsDevToolsWindow() == NULL) { 373 if (host != NULL && host->AsDevToolsWindow() == NULL) {
374 // Break remote debugging / extension debugging session. 374 // Break remote debugging session.
375 UnregisterDevToolsClientHostFor(inspected_rvh); 375 UnregisterDevToolsClientHostFor(inspected_rvh);
376 host = NULL; 376 host = NULL;
377 } 377 }
378 378
379 if (!host) { 379 if (!host) {
380 bool docked = inspected_rvh->process()->profile()->GetPrefs()-> 380 bool docked = inspected_rvh->process()->profile()->GetPrefs()->
381 GetBoolean(prefs::kDevToolsOpenDocked); 381 GetBoolean(prefs::kDevToolsOpenDocked);
382 host = new DevToolsWindow( 382 host = new DevToolsWindow(
383 inspected_rvh->site_instance()->browsing_instance()->profile(), 383 inspected_rvh->site_instance()->browsing_instance()->profile(),
384 inspected_rvh, 384 inspected_rvh,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 for (InspectedRvhToClientHostMap::iterator it = 457 for (InspectedRvhToClientHostMap::iterator it =
458 inspected_rvh_to_client_host_.begin(); 458 inspected_rvh_to_client_host_.begin();
459 it != inspected_rvh_to_client_host_.end(); ++it) { 459 it != inspected_rvh_to_client_host_.end(); ++it) {
460 rhvs.push_back(it->first); 460 rhvs.push_back(it->first);
461 } 461 }
462 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); 462 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin();
463 it != rhvs.end(); ++it) { 463 it != rhvs.end(); ++it) {
464 UnregisterDevToolsClientHostFor(*it); 464 UnregisterDevToolsClientHostFor(*it);
465 } 465 }
466 } 466 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698