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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 | 425 |
426 // static | 426 // static |
427 void RenderFrameDevToolsAgentHost::WebContentsCreated( | 427 void RenderFrameDevToolsAgentHost::WebContentsCreated( |
428 WebContents* web_contents) { | 428 WebContents* web_contents) { |
429 if (ShouldForceCreation()) { | 429 if (ShouldForceCreation()) { |
430 // Force agent host. | 430 // Force agent host. |
431 DevToolsAgentHost::GetOrCreateFor(web_contents); | 431 DevToolsAgentHost::GetOrCreateFor(web_contents); |
432 } | 432 } |
433 } | 433 } |
434 | 434 |
435 bool RenderFrameDevToolsAgentHost::NotifyCertificateError( | |
436 RenderFrameDevToolsAgentHost* agent_host, | |
437 int cert_error, | |
438 const GURL& request_url, | |
439 base::Callback<void(content::CertificateRequestResultType)> callback) { | |
pfeldman
2017/02/16 01:35:34
Otherwise this looks awkward: you call a static me
Eric Seckler
2017/02/16 02:01:07
I think Iris was wondering if we can make DevTools
irisu
2017/02/16 04:47:32
Yes, that's what I'm confused about.
| |
440 if (!agent_host || !agent_host->session()) | |
441 return false; | |
442 return protocol::SecurityHandler::FromSession(agent_host->session()) | |
443 ->NotifyCertificateError(cert_error, request_url, callback); | |
444 } | |
445 | |
435 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( | 446 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( |
436 RenderFrameHostImpl* host) | 447 RenderFrameHostImpl* host) |
437 : DevToolsAgentHostImpl(base::GenerateGUID()), | 448 : DevToolsAgentHostImpl(base::GenerateGUID()), |
438 frame_trace_recorder_(nullptr), | 449 frame_trace_recorder_(nullptr), |
439 handlers_frame_host_(nullptr), | 450 handlers_frame_host_(nullptr), |
440 current_frame_crashed_(false), | 451 current_frame_crashed_(false), |
441 pending_handle_(nullptr), | 452 pending_handle_(nullptr), |
442 frame_tree_node_(host->frame_tree_node()) { | 453 frame_tree_node_(host->frame_tree_node()) { |
443 SetPending(host); | 454 SetPending(host); |
444 CommitPending(); | 455 CommitPending(); |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1152 RenderFrameHost* host) { | 1163 RenderFrameHost* host) { |
1153 return (current_ && current_->host() == host) || | 1164 return (current_ && current_->host() == host) || |
1154 (pending_ && pending_->host() == host); | 1165 (pending_ && pending_->host() == host); |
1155 } | 1166 } |
1156 | 1167 |
1157 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1168 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
1158 return current_ && current_->host()->GetParent(); | 1169 return current_ && current_->host()->GetParent(); |
1159 } | 1170 } |
1160 | 1171 |
1161 } // namespace content | 1172 } // namespace content |
OLD | NEW |