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 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
9 #include "content/browser/devtools/protocol/security.h" | 10 #include "content/browser/devtools/protocol/security.h" |
10 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 class RenderFrameHostImpl; | 15 class RenderFrameHostImpl; |
15 | 16 |
16 namespace protocol { | 17 namespace protocol { |
17 | 18 |
18 class SecurityHandler : public Security::Backend, | 19 class SecurityHandler : public DevToolsDomainHandler, |
| 20 public Security::Backend, |
19 public WebContentsObserver { | 21 public WebContentsObserver { |
20 public: | 22 public: |
21 SecurityHandler(); | 23 SecurityHandler(); |
22 ~SecurityHandler() override; | 24 ~SecurityHandler() override; |
23 | 25 |
24 void Wire(UberDispatcher*); | 26 void Wire(UberDispatcher* dispatcher) override; |
25 void SetRenderFrameHost(RenderFrameHostImpl* host); | 27 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
26 | 28 |
27 Response Enable() override; | 29 Response Enable() override; |
28 Response Disable() override; | 30 Response Disable() override; |
29 Response ShowCertificateViewer() override; | 31 Response ShowCertificateViewer() override; |
30 | 32 |
31 private: | 33 private: |
32 void AttachToRenderFrameHost(); | 34 void AttachToRenderFrameHost(); |
33 | 35 |
34 // WebContentsObserver overrides | 36 // WebContentsObserver overrides |
35 void DidChangeVisibleSecurityState() override; | 37 void DidChangeVisibleSecurityState() override; |
36 | 38 |
37 std::unique_ptr<Security::Frontend> frontend_; | 39 std::unique_ptr<Security::Frontend> frontend_; |
38 bool enabled_; | 40 bool enabled_; |
39 RenderFrameHostImpl* host_; | 41 RenderFrameHostImpl* host_; |
40 | 42 |
41 DISALLOW_COPY_AND_ASSIGN(SecurityHandler); | 43 DISALLOW_COPY_AND_ASSIGN(SecurityHandler); |
42 }; | 44 }; |
43 | 45 |
44 } // namespace protocol | 46 } // namespace protocol |
45 } // namespace content | 47 } // namespace content |
46 | 48 |
47 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ | 49 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ |
OLD | NEW |