| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 for (const auto& pair : old->sent_messages_) { | 189 for (const auto& pair : old->sent_messages_) { |
| 190 DispatchProtocolMessage(pair.second.session_id, pair.first, | 190 DispatchProtocolMessage(pair.second.session_id, pair.first, |
| 191 pair.second.method, pair.second.message); | 191 pair.second.method, pair.second.message); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 GrantPolicy(); | 194 GrantPolicy(); |
| 195 attached_ = true; | 195 attached_ = true; |
| 196 } | 196 } |
| 197 | 197 |
| 198 void RenderFrameDevToolsAgentHost::FrameHostHolder::Detach(int session_id) { | 198 void RenderFrameDevToolsAgentHost::FrameHostHolder::Detach(int session_id) { |
| 199 host_->Send(new DevToolsAgentMsg_Detach(host_->GetRoutingID())); | 199 host_->Send(new DevToolsAgentMsg_Detach(host_->GetRoutingID(), session_id)); |
| 200 RevokePolicy(); | 200 RevokePolicy(); |
| 201 attached_ = false; | 201 attached_ = false; |
| 202 } | 202 } |
| 203 | 203 |
| 204 void RenderFrameDevToolsAgentHost::FrameHostHolder::GrantPolicy() { | 204 void RenderFrameDevToolsAgentHost::FrameHostHolder::GrantPolicy() { |
| 205 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies( | 205 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies( |
| 206 host_->GetProcess()->GetID()); | 206 host_->GetProcess()->GetID()); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void RenderFrameDevToolsAgentHost::FrameHostHolder::RevokePolicy() { | 209 void RenderFrameDevToolsAgentHost::FrameHostHolder::RevokePolicy() { |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 RenderFrameHost* host) { | 1168 RenderFrameHost* host) { |
| 1169 return (current_ && current_->host() == host) || | 1169 return (current_ && current_->host() == host) || |
| 1170 (pending_ && pending_->host() == host); | 1170 (pending_ && pending_->host() == host); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1173 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 1174 return current_ && current_->host()->GetParent(); | 1174 return current_ && current_->host()->GetParent(); |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 } // namespace content | 1177 } // namespace content |
| OLD | NEW |