| 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_GNUBBY_EXTENSION_SESSION_H_ | 5 #ifndef REMOTING_HOST_SECURITY_KEY_GNUBBY_EXTENSION_SESSION_H_ |
| 6 #define REMOTING_HOST_SECURITY_KEY_GNUBBY_EXTENSION_SESSION_H_ | 6 #define REMOTING_HOST_SECURITY_KEY_GNUBBY_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/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
| 14 #include "remoting/host/host_extension_session.h" | 14 #include "remoting/host/host_extension_session.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace remoting { | 20 namespace remoting { |
| 21 | 21 |
| 22 class ClientSessionDetails; |
| 22 class GnubbyAuthHandler; | 23 class GnubbyAuthHandler; |
| 23 | 24 |
| 24 namespace protocol { | 25 namespace protocol { |
| 25 class ClientStub; | 26 class ClientStub; |
| 26 } | 27 } |
| 27 | 28 |
| 28 // A HostExtensionSession implementation that enables Security Key support. | 29 // A HostExtensionSession implementation that enables Security Key support. |
| 29 class GnubbyExtensionSession : public HostExtensionSession { | 30 class GnubbyExtensionSession : public HostExtensionSession { |
| 30 public: | 31 public: |
| 31 explicit GnubbyExtensionSession(protocol::ClientStub* client_stub); | 32 GnubbyExtensionSession(ClientSessionDetails* client_session_details, |
| 33 protocol::ClientStub* client_stub); |
| 32 ~GnubbyExtensionSession() override; | 34 ~GnubbyExtensionSession() override; |
| 33 | 35 |
| 34 // HostExtensionSession interface. | 36 // HostExtensionSession interface. |
| 35 bool OnExtensionMessage(ClientSessionDetails* client_session_details, | 37 bool OnExtensionMessage(ClientSessionDetails* client_session_details, |
| 36 protocol::ClientStub* client_stub, | 38 protocol::ClientStub* client_stub, |
| 37 const protocol::ExtensionMessage& message) override; | 39 const protocol::ExtensionMessage& message) override; |
| 38 | 40 |
| 39 // Allows the underlying GnubbyAuthHandler to be overridden for unit testing. | 41 // Allows the underlying GnubbyAuthHandler to be overridden for unit testing. |
| 40 void SetGnubbyAuthHandlerForTesting( | 42 void SetGnubbyAuthHandlerForTesting( |
| 41 std::unique_ptr<GnubbyAuthHandler> gnubby_auth_handler); | 43 std::unique_ptr<GnubbyAuthHandler> gnubby_auth_handler); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 56 | 58 |
| 57 // Handles platform specific gnubby operations. | 59 // Handles platform specific gnubby operations. |
| 58 std::unique_ptr<GnubbyAuthHandler> gnubby_auth_handler_; | 60 std::unique_ptr<GnubbyAuthHandler> gnubby_auth_handler_; |
| 59 | 61 |
| 60 DISALLOW_COPY_AND_ASSIGN(GnubbyExtensionSession); | 62 DISALLOW_COPY_AND_ASSIGN(GnubbyExtensionSession); |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace remoting | 65 } // namespace remoting |
| 64 | 66 |
| 65 #endif // REMOTING_HOST_SECURITY_KEY_GNUBBY_EXTENSION_SESSION_H_ | 67 #endif // REMOTING_HOST_SECURITY_KEY_GNUBBY_EXTENSION_SESSION_H_ |
| OLD | NEW |