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

Unified Diff: content/browser/devtools/protocol/network_handler.cc

Issue 1325023002: DevTools: [security] allow opening certificate viewer from devtools (chrome) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved into wcd Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/protocol/network_handler.h ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/network_handler.cc
diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/browser/devtools/protocol/network_handler.cc
index 66f7bcc171a2be67ac21022a498e28dc788db116..27f82f45c8b171c833e778543875688727aeaba5 100644
--- a/content/browser/devtools/protocol/network_handler.cc
+++ b/content/browser/devtools/protocol/network_handler.cc
@@ -15,6 +15,8 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/site_instance.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/content_client.h"
#include "net/cert/x509_cert_types.h"
#include "net/cert/x509_certificate.h"
@@ -311,6 +313,15 @@ Response NetworkHandler::GetCertificateDetails(
return Response::OK();
}
+Response NetworkHandler::ShowCertificateViewer(int certificate_id) {
+ if (!host_)
+ return Response::InternalError("Could not connect to view");
+ WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
+ web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
+ web_contents, certificate_id);
+ return Response::OK();
+}
+
} // namespace dom
} // namespace devtools
} // namespace content
« no previous file with comments | « content/browser/devtools/protocol/network_handler.h ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698