Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 2858043003: [DevTools] Pass session id in detach request (Closed)
Patch Set: test compile Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/devtools/worker_devtools_agent_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/worker_devtools_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698