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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 RenderFrameDevToolsAgentHost* agent_host = FindAgentHost(web_contents); | 301 RenderFrameDevToolsAgentHost* agent_host = FindAgentHost(web_contents); |
302 return agent_host && agent_host->IsAttached(); | 302 return agent_host && agent_host->IsAttached(); |
303 } | 303 } |
304 | 304 |
305 // static | 305 // static |
306 void RenderFrameDevToolsAgentHost::AddAllAgentHosts( | 306 void RenderFrameDevToolsAgentHost::AddAllAgentHosts( |
307 DevToolsAgentHost::List* result) { | 307 DevToolsAgentHost::List* result) { |
308 base::Callback<void(RenderFrameHost*)> callback = base::Bind( | 308 base::Callback<void(RenderFrameHost*)> callback = base::Bind( |
309 RenderFrameDevToolsAgentHost::AppendAgentHostForFrameIfApplicable, | 309 RenderFrameDevToolsAgentHost::AppendAgentHostForFrameIfApplicable, |
310 base::Unretained(result)); | 310 base::Unretained(result)); |
311 for (const auto& wc : WebContentsImpl::GetAllWebContents()) | 311 for (auto* wc : WebContentsImpl::GetAllWebContents()) |
312 wc->ForEachFrame(callback); | 312 wc->ForEachFrame(callback); |
313 } | 313 } |
314 | 314 |
315 // static | 315 // static |
316 void RenderFrameDevToolsAgentHost::OnCancelPendingNavigation( | 316 void RenderFrameDevToolsAgentHost::OnCancelPendingNavigation( |
317 RenderFrameHost* pending, | 317 RenderFrameHost* pending, |
318 RenderFrameHost* current) { | 318 RenderFrameHost* current) { |
319 if (IsBrowserSideNavigationEnabled()) | 319 if (IsBrowserSideNavigationEnabled()) |
320 return; | 320 return; |
321 | 321 |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 RenderFrameHost* host) { | 943 RenderFrameHost* host) { |
944 return (current_ && current_->host() == host) || | 944 return (current_ && current_->host() == host) || |
945 (pending_ && pending_->host() == host); | 945 (pending_ && pending_->host() == host); |
946 } | 946 } |
947 | 947 |
948 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 948 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
949 return current_ && current_->host()->GetParent(); | 949 return current_ && current_->host()->GetParent(); |
950 } | 950 } |
951 | 951 |
952 } // namespace content | 952 } // namespace content |
OLD | NEW |