OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_EXTENSION_SESSION_H_ | 5 #ifndef REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_EXTENSION_SESSION_H_ |
6 #define REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_EXTENSION_SESSION_H_ | 6 #define REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_EXTENSION_SESSION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" |
13 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
14 #include "remoting/host/host_extension_session.h" | 15 #include "remoting/host/host_extension_session.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 class DictionaryValue; | 18 class DictionaryValue; |
18 } | 19 class SingleThreadTaskRunner; |
| 20 } // namespace base |
19 | 21 |
20 namespace remoting { | 22 namespace remoting { |
21 | 23 |
22 class ClientSessionDetails; | 24 class ClientSessionDetails; |
23 class SecurityKeyAuthHandler; | 25 class SecurityKeyAuthHandler; |
24 | 26 |
25 namespace protocol { | 27 namespace protocol { |
26 class ClientStub; | 28 class ClientStub; |
27 } | 29 } |
28 | 30 |
29 // A HostExtensionSession implementation that enables Security Key support. | 31 // A HostExtensionSession implementation that enables Security Key support. |
30 class SecurityKeyExtensionSession : public HostExtensionSession { | 32 class SecurityKeyExtensionSession : public HostExtensionSession { |
31 public: | 33 public: |
32 SecurityKeyExtensionSession(ClientSessionDetails* client_session_details, | 34 SecurityKeyExtensionSession( |
33 protocol::ClientStub* client_stub); | 35 ClientSessionDetails* client_session_details, |
| 36 protocol::ClientStub* client_stub, |
| 37 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); |
34 ~SecurityKeyExtensionSession() override; | 38 ~SecurityKeyExtensionSession() override; |
35 | 39 |
36 // HostExtensionSession interface. | 40 // HostExtensionSession interface. |
37 bool OnExtensionMessage(ClientSessionDetails* client_session_details, | 41 bool OnExtensionMessage(ClientSessionDetails* client_session_details, |
38 protocol::ClientStub* client_stub, | 42 protocol::ClientStub* client_stub, |
39 const protocol::ExtensionMessage& message) override; | 43 const protocol::ExtensionMessage& message) override; |
40 | 44 |
41 // Allows overriding SecurityKeyAuthHandler for unit testing. | 45 // Allows overriding SecurityKeyAuthHandler for unit testing. |
42 void SetSecurityKeyAuthHandlerForTesting( | 46 void SetSecurityKeyAuthHandlerForTesting( |
43 std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler); | 47 std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler); |
(...skipping 14 matching lines...) Expand all Loading... |
58 | 62 |
59 // Handles platform specific security key operations. | 63 // Handles platform specific security key operations. |
60 std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler_; | 64 std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler_; |
61 | 65 |
62 DISALLOW_COPY_AND_ASSIGN(SecurityKeyExtensionSession); | 66 DISALLOW_COPY_AND_ASSIGN(SecurityKeyExtensionSession); |
63 }; | 67 }; |
64 | 68 |
65 } // namespace remoting | 69 } // namespace remoting |
66 | 70 |
67 #endif // REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_EXTENSION_SESSION_H_ | 71 #endif // REMOTING_HOST_SECURITY_KEY_SECURITY_KEY_EXTENSION_SESSION_H_ |
OLD | NEW |