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

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

Issue 1001002: Initial support for inspecting extension popups. (Closed)
Patch Set: pre submit Created 10 years, 9 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
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // It might be in the list of orphan client hosts, remove it from there. 164 // It might be in the list of orphan client hosts, remove it from there.
165 for (OrphanClientHosts::iterator it = orphan_client_hosts_.begin(); 165 for (OrphanClientHosts::iterator it = orphan_client_hosts_.begin();
166 it != orphan_client_hosts_.end(); ++it) { 166 it != orphan_client_hosts_.end(); ++it) {
167 if (it->second.first == host) { 167 if (it->second.first == host) {
168 orphan_client_hosts_.erase(it->first); 168 orphan_client_hosts_.erase(it->first);
169 return; 169 return;
170 } 170 }
171 } 171 }
172 return; 172 return;
173 } 173 }
174
175 NotificationService::current()->Notify(
176 NotificationType::DEVTOOLS_WINDOW_CLOSING,
177 Source<Profile>(inspected_rvh->site_instance()->GetProcess()->profile()),
178 Details<RenderViewHost>(inspected_rvh));
179
174 SendDetachToAgent(inspected_rvh); 180 SendDetachToAgent(inspected_rvh);
175 181
176 inspected_rvh_to_client_host_.erase(inspected_rvh); 182 inspected_rvh_to_client_host_.erase(inspected_rvh);
177 runtime_features_.erase(inspected_rvh); 183 runtime_features_.erase(inspected_rvh);
178 client_host_to_inspected_rvh_.erase(host); 184 client_host_to_inspected_rvh_.erase(host);
179 } 185 }
180 186
181 RenderViewHost* DevToolsManager::GetInspectedRenderViewHost( 187 RenderViewHost* DevToolsManager::GetInspectedRenderViewHost(
182 DevToolsClientHost* client_host) { 188 DevToolsClientHost* client_host) {
183 ClientHostToInspectedRvhMap::iterator it = 189 ClientHostToInspectedRvhMap::iterator it =
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 371 }
366 } 372 }
367 373
368 void DevToolsManager::CloseWindow(DevToolsClientHost* client_host) { 374 void DevToolsManager::CloseWindow(DevToolsClientHost* client_host) {
369 RenderViewHost* inspected_rvh = GetInspectedRenderViewHost(client_host); 375 RenderViewHost* inspected_rvh = GetInspectedRenderViewHost(client_host);
370 DCHECK(inspected_rvh); 376 DCHECK(inspected_rvh);
371 SendDetachToAgent(inspected_rvh); 377 SendDetachToAgent(inspected_rvh);
372 378
373 UnregisterDevToolsClientHostFor(inspected_rvh); 379 UnregisterDevToolsClientHostFor(inspected_rvh);
374 } 380 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/extension_action_context_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698