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 "content/browser/devtools/devtools_protocol_handler.h" | 8 #include "content/browser/devtools/devtools_protocol_handler.h" |
9 #include "content/browser/devtools/protocol/devtools_protocol_client.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" |
10 | 12 |
11 namespace content { | 13 namespace content { |
12 namespace devtools { | 14 namespace devtools { |
13 namespace security { | 15 namespace security { |
14 | 16 |
15 class SecurityHandler { | 17 class SecurityHandler : public WebContentsObserver { |
16 public: | 18 public: |
17 typedef DevToolsProtocolClient::Response Response; | 19 typedef DevToolsProtocolClient::Response Response; |
18 | 20 |
19 SecurityHandler(); | 21 SecurityHandler(); |
20 virtual ~SecurityHandler(); | 22 ~SecurityHandler() override; |
21 | 23 |
22 void SetClient(scoped_ptr<DevToolsProtocolClient> client); | 24 void SetClient(scoped_ptr<Client> client); |
| 25 void SetRenderFrameHost(RenderFrameHost* host); |
23 | 26 |
24 Response Enable(); | 27 Response Enable(); |
25 Response Disable(); | 28 Response Disable(); |
26 | 29 |
27 private: | 30 private: |
28 | 31 |
| 32 // WebContentsObserver overrides |
| 33 void SecurityStyleChanged(SecurityStyle security_style) override; |
| 34 |
| 35 scoped_ptr<Client> client_; |
| 36 bool enabled_; |
| 37 RenderFrameHost* host_; |
| 38 |
29 DISALLOW_COPY_AND_ASSIGN(SecurityHandler); | 39 DISALLOW_COPY_AND_ASSIGN(SecurityHandler); |
30 }; | 40 }; |
31 | 41 |
32 } // namespace security | 42 } // namespace security |
33 } // namespace devtools | 43 } // namespace devtools |
34 } // namespace content | 44 } // namespace content |
35 | 45 |
36 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ | 46 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ |
OLD | NEW |