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

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

Issue 10837296: Fix a bug where the inspector would not keep event pages alive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: notification Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_impl.h" 5 #include "content/browser/debugger/devtools_manager_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 for (OrphanClientHosts::iterator it = orphan_client_hosts_.begin(); 111 for (OrphanClientHosts::iterator it = orphan_client_hosts_.begin();
112 it != orphan_client_hosts_.end(); ++it) { 112 it != orphan_client_hosts_.end(); ++it) {
113 if (it->second.first == client_host) { 113 if (it->second.first == client_host) {
114 orphan_client_hosts_.erase(it->first); 114 orphan_client_hosts_.erase(it->first);
115 return; 115 return;
116 } 116 }
117 } 117 }
118 return; 118 return;
119 } 119 }
120 120
121 agent_host->NotifyClientClosing();
122
123 UnbindClientHost(agent_host, client_host); 121 UnbindClientHost(agent_host, client_host);
124 } 122 }
125 123
126 void DevToolsManagerImpl::AgentHostClosing(DevToolsAgentHost* agent_host) { 124 void DevToolsManagerImpl::AgentHostClosing(DevToolsAgentHost* agent_host) {
127 UnregisterDevToolsClientHostFor(agent_host); 125 UnregisterDevToolsClientHostFor(agent_host);
128 } 126 }
129 127
130 void DevToolsManagerImpl::UnregisterDevToolsClientHostFor( 128 void DevToolsManagerImpl::UnregisterDevToolsClientHostFor(
131 DevToolsAgentHost* agent_host) { 129 DevToolsAgentHost* agent_host) {
132 DevToolsClientHost* client_host = GetDevToolsClientHostFor(agent_host); 130 DevToolsClientHost* client_host = GetDevToolsClientHostFor(agent_host);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 it != agent_to_client_host_.end(); ++it) { 293 it != agent_to_client_host_.end(); ++it) {
296 agents.push_back(it->first); 294 agents.push_back(it->first);
297 } 295 }
298 for (std::vector<DevToolsAgentHost*>::iterator it = agents.begin(); 296 for (std::vector<DevToolsAgentHost*>::iterator it = agents.begin();
299 it != agents.end(); ++it) { 297 it != agents.end(); ++it) {
300 UnregisterDevToolsClientHostFor(*it); 298 UnregisterDevToolsClientHostFor(*it);
301 } 299 }
302 } 300 }
303 301
304 } // namespace content 302 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698