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

Side by Side Diff: content/browser/devtools/protocol/security_handler.h

Issue 2567343003: Revert of [DevTools] Migrate security handler to new generator. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
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/security.h" 9 #include "content/browser/devtools/devtools_protocol_handler.h"
10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.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 {
14 namespace devtools {
15 namespace security {
13 16
14 class RenderFrameHostImpl; 17 class SecurityHandler : public WebContentsObserver {
18 public:
19 typedef DevToolsProtocolClient::Response Response;
15 20
16 namespace protocol {
17
18 class SecurityHandler : public Security::Backend,
19 public WebContentsObserver {
20 public:
21 SecurityHandler(); 21 SecurityHandler();
22 ~SecurityHandler() override; 22 ~SecurityHandler() override;
23 23
24 void Wire(UberDispatcher*); 24 void SetClient(std::unique_ptr<Client> client);
25 void SetRenderFrameHost(RenderFrameHostImpl* host); 25 void SetRenderFrameHost(RenderFrameHost* host);
26 26
27 Response Enable() override; 27 Response Enable();
28 Response Disable() override; 28 Response Disable();
29 Response ShowCertificateViewer() override; 29 Response ShowCertificateViewer();
30 30
31 private: 31 private:
32 void AttachToRenderFrameHost(); 32 void AttachToRenderFrameHost();
33 33
34 // WebContentsObserver overrides 34 // WebContentsObserver overrides
35 void DidChangeVisibleSecurityState() override; 35 void DidChangeVisibleSecurityState() override;
36 36
37 std::unique_ptr<Security::Frontend> frontend_; 37 std::unique_ptr<Client> client_;
38 bool enabled_; 38 bool enabled_;
39 RenderFrameHostImpl* host_; 39 RenderFrameHost* host_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(SecurityHandler); 41 DISALLOW_COPY_AND_ASSIGN(SecurityHandler);
42 }; 42 };
43 43
44 } // namespace protocol 44 } // namespace security
45 } // namespace devtools
45 } // namespace content 46 } // namespace content
46 47
47 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ 48 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698