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

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

Issue 1163963002: Implement SecurityHandler to send the lock icon status to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add web_contents.h to security_handler.cc for WebContents::FromRenderFrameHost(). Created 5 years, 6 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
Index: content/browser/devtools/protocol/security_handler.h
diff --git a/content/browser/devtools/protocol/security_handler.h b/content/browser/devtools/protocol/security_handler.h
index 59b1400cec55df845d38bf2c019e4254c8dd5858..c6069092ec22d39e56bc887c90d346a6d55e9361 100644
--- a/content/browser/devtools/protocol/security_handler.h
+++ b/content/browser/devtools/protocol/security_handler.h
@@ -6,25 +6,35 @@
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_
#include "content/browser/devtools/devtools_protocol_handler.h"
-#include "content/browser/devtools/protocol/devtools_protocol_client.h"
+#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/security_style.h"
namespace content {
namespace devtools {
namespace security {
-class SecurityHandler {
+class SecurityHandler : private WebContentsObserver {
pfeldman 2015/06/11 06:45:50 When using inheritance, make it public: http://go
lgarron 2015/06/11 22:00:53 Done.
public:
typedef DevToolsProtocolClient::Response Response;
SecurityHandler();
- virtual ~SecurityHandler();
+ ~SecurityHandler() override;
- void SetClient(scoped_ptr<DevToolsProtocolClient> client);
+ void SetClient(scoped_ptr<Client> client);
+ void SetRenderFrameHost(RenderFrameHost* host);
+ void SecurityStyleChanged(SecurityStyle security_style) override;
pfeldman 2015/06/11 06:45:50 Blank line, then // WebContentsObserver overrides,
lgarron 2015/06/11 22:00:53 Done.
Response Enable();
Response Disable();
private:
+ std::string SecurityStyleToProtocolSecurityState(
+ content::SecurityStyle security_style);
+
+ scoped_ptr<Client> client_;
+ bool enabled_;
+ RenderFrameHost* host_;
DISALLOW_COPY_AND_ASSIGN(SecurityHandler);
};

Powered by Google App Engine
This is Rietveld 408576698