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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 void RenderFrameDevToolsAgentHost::OnRequestNewWindow( | 1008 void RenderFrameDevToolsAgentHost::OnRequestNewWindow( |
1009 RenderFrameHost* sender, | 1009 RenderFrameHost* sender, |
1010 int new_routing_id) { | 1010 int new_routing_id) { |
1011 RenderFrameHostImpl* frame_host = RenderFrameHostImpl::FromID( | 1011 RenderFrameHostImpl* frame_host = RenderFrameHostImpl::FromID( |
1012 sender->GetProcess()->GetID(), new_routing_id); | 1012 sender->GetProcess()->GetID(), new_routing_id); |
1013 | 1013 |
1014 bool success = false; | 1014 bool success = false; |
1015 if (IsAttached() && sender->GetRoutingID() != new_routing_id && frame_host) { | 1015 if (IsAttached() && sender->GetRoutingID() != new_routing_id && frame_host) { |
1016 scoped_refptr<DevToolsAgentHost> agent = | 1016 scoped_refptr<DevToolsAgentHost> agent = |
1017 DevToolsAgentHost::GetOrCreateFor(frame_host); | 1017 DevToolsAgentHost::GetOrCreateFor(frame_host); |
1018 success = agent->Inspect(); | 1018 success = agent->Inspect(nullptr); |
1019 } | 1019 } |
1020 | 1020 |
1021 sender->Send(new DevToolsAgentMsg_RequestNewWindow_ACK( | 1021 sender->Send(new DevToolsAgentMsg_RequestNewWindow_ACK( |
1022 sender->GetRoutingID(), success)); | 1022 sender->GetRoutingID(), success)); |
1023 } | 1023 } |
1024 | 1024 |
1025 bool RenderFrameDevToolsAgentHost::HasRenderFrameHost( | 1025 bool RenderFrameDevToolsAgentHost::HasRenderFrameHost( |
1026 RenderFrameHost* host) { | 1026 RenderFrameHost* host) { |
1027 return (current_ && current_->host() == host) || | 1027 return (current_ && current_->host() == host) || |
1028 (pending_ && pending_->host() == host); | 1028 (pending_ && pending_->host() == host); |
1029 } | 1029 } |
1030 | 1030 |
1031 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1031 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
1032 return current_ && current_->host()->GetParent(); | 1032 return current_ && current_->host()->GetParent(); |
1033 } | 1033 } |
1034 | 1034 |
1035 } // namespace content | 1035 } // namespace content |
OLD | NEW |