Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / browser / devtools / protocol / security_handler.h
blob407d93c4ec9756c9b1c79a76ca46f6152d183826
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_
8 #include "content/browser/devtools/devtools_protocol_handler.h"
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 #include "content/public/browser/web_contents_observer.h"
11 #include "content/public/common/security_style.h"
13 namespace content {
14 namespace devtools {
15 namespace security {
17 class SecurityHandler : public WebContentsObserver {
18 public:
19 typedef DevToolsProtocolClient::Response Response;
21 SecurityHandler();
22 ~SecurityHandler() override;
24 void SetClient(scoped_ptr<Client> client);
25 void SetRenderFrameHost(RenderFrameHost* host);
27 Response Enable();
28 Response Disable();
30 private:
31 void AttachToRenderFrameHost();
33 // WebContentsObserver overrides
34 void SecurityStyleChanged(
35 SecurityStyle security_style,
36 const SecurityStyleExplanations& security_style_explanations) override;
38 scoped_ptr<Client> client_;
39 bool enabled_;
40 RenderFrameHost* host_;
42 DISALLOW_COPY_AND_ASSIGN(SecurityHandler);
45 } // namespace security
46 } // namespace devtools
47 } // namespace content
49 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_