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

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

Issue 7257002: DevTools: handle docked window close in DevToolsWindow, not DevToolsManager. (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
« no previous file with comments | « no previous file | content/browser/debugger/devtools_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return; 116 return;
117 117
118 DevToolsWindow* window = client_host->AsDevToolsWindow(); 118 DevToolsWindow* window = client_host->AsDevToolsWindow();
119 DCHECK(window); 119 DCHECK(window);
120 window->Activate(); 120 window->Activate();
121 } 121 }
122 122
123 void DevToolsManager::CloseWindow(RenderViewHost* client_rvh) { 123 void DevToolsManager::CloseWindow(RenderViewHost* client_rvh) {
124 DevToolsClientHost* client_host = FindOwnerDevToolsClientHost(client_rvh); 124 DevToolsClientHost* client_host = FindOwnerDevToolsClientHost(client_rvh);
125 if (client_host) { 125 if (client_host) {
126 RenderViewHost* inspected_rvh = GetInspectedRenderViewHost(client_host); 126 DevToolsWindow* window = client_host->AsDevToolsWindow();
127 DCHECK(inspected_rvh); 127 DCHECK(window);
128 UnregisterDevToolsClientHostFor(inspected_rvh); 128 window->Close();
129 } 129 }
130 } 130 }
131 131
132 void DevToolsManager::RequestDockWindow(RenderViewHost* client_rvh) { 132 void DevToolsManager::RequestDockWindow(RenderViewHost* client_rvh) {
133 ReopenWindow(client_rvh, true); 133 ReopenWindow(client_rvh, true);
134 } 134 }
135 135
136 void DevToolsManager::RequestUndockWindow(RenderViewHost* client_rvh) { 136 void DevToolsManager::RequestUndockWindow(RenderViewHost* client_rvh) {
137 ReopenWindow(client_rvh, false); 137 ReopenWindow(client_rvh, false);
138 } 138 }
(...skipping 318 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
« no previous file with comments | « no previous file | content/browser/debugger/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698