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

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

Issue 2698883004: DevTools: expose session to handlers. (Closed)
Patch Set: Created 3 years, 10 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/security_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/security_handler.cc
diff --git a/content/browser/devtools/protocol/security_handler.cc b/content/browser/devtools/protocol/security_handler.cc
index cf214a7fc8782702fab8d8bb77bc1a9cd7b96764..6b6808e4367c2719ae13e36f62823be48c4487f1 100644
--- a/content/browser/devtools/protocol/security_handler.cc
+++ b/content/browser/devtools/protocol/security_handler.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "content/browser/devtools/devtools_session.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -56,6 +57,15 @@ void AddExplanations(
} // namespace
+// static
+SecurityHandler* SecurityHandler::FromAgentHost(DevToolsAgentHostImpl* host) {
+ DevToolsSession* session = DevToolsDomainHandler::GetFirstSession(host);
+ if (!session)
+ return nullptr;
+ return static_cast<SecurityHandler*>(
+ session->GetHandlerByName(Security::Metainfo::domainName));
+}
+
SecurityHandler::SecurityHandler()
: DevToolsDomainHandler(Security::Metainfo::domainName),
enabled_(false),
« no previous file with comments | « content/browser/devtools/protocol/security_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698