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 : 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.
| |
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); | |
26 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.
| |
23 | 27 |
24 Response Enable(); | 28 Response Enable(); |
25 Response Disable(); | 29 Response Disable(); |
26 | 30 |
27 private: | 31 private: |
32 std::string SecurityStyleToProtocolSecurityState( | |
33 content::SecurityStyle security_style); | |
34 | |
35 scoped_ptr<Client> client_; | |
36 bool enabled_; | |
37 RenderFrameHost* host_; | |
28 | 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 |