OLD | NEW |
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/devtools/devtools_manager_impl.h" | 5 #include "content/browser/devtools/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 bool DevToolsManagerImpl::DispatchOnInspectorBackend( | 67 bool DevToolsManagerImpl::DispatchOnInspectorBackend( |
68 DevToolsClientHost* from, | 68 DevToolsClientHost* from, |
69 const std::string& message) { | 69 const std::string& message) { |
70 DevToolsAgentHost* agent_host = GetDevToolsAgentHostFor(from); | 70 DevToolsAgentHost* agent_host = GetDevToolsAgentHostFor(from); |
71 if (!agent_host) | 71 if (!agent_host) |
72 return false; | 72 return false; |
73 DevToolsAgentHostImpl* agent_host_impl = | 73 DevToolsAgentHostImpl* agent_host_impl = |
74 static_cast<DevToolsAgentHostImpl*>(agent_host); | 74 static_cast<DevToolsAgentHostImpl*>(agent_host); |
75 agent_host_impl->DipatchOnInspectorBackend(message); | 75 agent_host_impl->DispatchOnInspectorBackend(message); |
76 return true; | 76 return true; |
77 } | 77 } |
78 | 78 |
79 void DevToolsManagerImpl::DispatchOnInspectorFrontend( | 79 void DevToolsManagerImpl::DispatchOnInspectorFrontend( |
80 DevToolsAgentHost* agent_host, | 80 DevToolsAgentHost* agent_host, |
81 const std::string& message) { | 81 const std::string& message) { |
82 DevToolsClientHost* client_host = GetDevToolsClientHostFor(agent_host); | 82 DevToolsClientHost* client_host = GetDevToolsClientHostFor(agent_host); |
83 if (!client_host) { | 83 if (!client_host) { |
84 // Client window was closed while there were messages | 84 // Client window was closed while there were messages |
85 // being sent to it. | 85 // being sent to it. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 it != agent_to_client_host_.end(); ++it) { | 177 it != agent_to_client_host_.end(); ++it) { |
178 agents.push_back(it->first); | 178 agents.push_back(it->first); |
179 } | 179 } |
180 for (std::vector<DevToolsAgentHost*>::iterator it = agents.begin(); | 180 for (std::vector<DevToolsAgentHost*>::iterator it = agents.begin(); |
181 it != agents.end(); ++it) { | 181 it != agents.end(); ++it) { |
182 UnregisterDevToolsClientHostFor(*it); | 182 UnregisterDevToolsClientHostFor(*it); |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 } // namespace content | 186 } // namespace content |
OLD | NEW |