| 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/render_frame_devtools_agent_host.h" | 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (ShouldCreateDevToolsFor(rfh)) | 294 if (ShouldCreateDevToolsFor(rfh)) |
| 295 result->push_back(RenderFrameDevToolsAgentHost::GetOrCreateFor(rfh)); | 295 result->push_back(RenderFrameDevToolsAgentHost::GetOrCreateFor(rfh)); |
| 296 } | 296 } |
| 297 | 297 |
| 298 // static | 298 // static |
| 299 bool DevToolsAgentHost::HasFor(WebContents* web_contents) { | 299 bool DevToolsAgentHost::HasFor(WebContents* web_contents) { |
| 300 return FindAgentHost(web_contents) != NULL; | 300 return FindAgentHost(web_contents) != NULL; |
| 301 } | 301 } |
| 302 | 302 |
| 303 // static | 303 // static |
| 304 bool DevToolsAgentHost::HasFor(RenderFrameHost* frame_host) { |
| 305 return FindAgentHost(frame_host) != NULL; |
| 306 } |
| 307 |
| 308 // static |
| 304 bool DevToolsAgentHost::IsDebuggerAttached(WebContents* web_contents) { | 309 bool DevToolsAgentHost::IsDebuggerAttached(WebContents* web_contents) { |
| 305 RenderFrameDevToolsAgentHost* agent_host = FindAgentHost(web_contents); | 310 RenderFrameDevToolsAgentHost* agent_host = FindAgentHost(web_contents); |
| 306 return agent_host && agent_host->IsAttached(); | 311 return agent_host && agent_host->IsAttached(); |
| 307 } | 312 } |
| 308 | 313 |
| 309 // static | 314 // static |
| 310 void RenderFrameDevToolsAgentHost::AddAllAgentHosts( | 315 void RenderFrameDevToolsAgentHost::AddAllAgentHosts( |
| 311 DevToolsAgentHost::List* result) { | 316 DevToolsAgentHost::List* result) { |
| 312 base::Callback<void(RenderFrameHost*)> callback = base::Bind( | 317 base::Callback<void(RenderFrameHost*)> callback = base::Bind( |
| 313 RenderFrameDevToolsAgentHost::AppendAgentHostForFrameIfApplicable, | 318 RenderFrameDevToolsAgentHost::AppendAgentHostForFrameIfApplicable, |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 RenderFrameHost* host) { | 1106 RenderFrameHost* host) { |
| 1102 return (current_ && current_->host() == host) || | 1107 return (current_ && current_->host() == host) || |
| 1103 (pending_ && pending_->host() == host); | 1108 (pending_ && pending_->host() == host); |
| 1104 } | 1109 } |
| 1105 | 1110 |
| 1106 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1111 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 1107 return current_ && current_->host()->GetParent(); | 1112 return current_ && current_->host()->GetParent(); |
| 1108 } | 1113 } |
| 1109 | 1114 |
| 1110 } // namespace content | 1115 } // namespace content |
| OLD | NEW |