OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/protocol/security_handler.h" | 5 #include "content/browser/devtools/protocol/security_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" | 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
10 #include "content/public/browser/security_style_explanations.h" | 10 #include "content/public/browser/security_style_explanations.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 return Response::OK(); | 141 return Response::OK(); |
142 } | 142 } |
143 | 143 |
144 Response SecurityHandler::Disable() { | 144 Response SecurityHandler::Disable() { |
145 enabled_ = false; | 145 enabled_ = false; |
146 WebContentsObserver::Observe(nullptr); | 146 WebContentsObserver::Observe(nullptr); |
147 return Response::OK(); | 147 return Response::OK(); |
148 } | 148 } |
149 | 149 |
| 150 Response SecurityHandler::ShowCertificateViewer(int certificate_id) { |
| 151 if (!host_) |
| 152 return Response::InternalError("Could not connect to view"); |
| 153 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); |
| 154 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
| 155 web_contents, certificate_id); |
| 156 return Response::OK(); |
| 157 } |
| 158 |
150 } // namespace security | 159 } // namespace security |
151 } // namespace devtools | 160 } // namespace devtools |
152 } // namespace content | 161 } // namespace content |
OLD | NEW |