OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_HOST_EXTENSION_H_ | 5 #ifndef REMOTING_HOST_HOST_EXTENSION_H_ |
6 #define REMOTING_HOST_HOST_EXTENSION_H_ | 6 #define REMOTING_HOST_HOST_EXTENSION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 | |
12 namespace remoting { | 11 namespace remoting { |
13 | 12 |
14 class ClientSessionControl; | 13 class ClientSessionControl; |
14 class ClientSessionDetails; | |
15 class HostExtensionSession; | 15 class HostExtensionSession; |
16 | 16 |
17 namespace protocol { | 17 namespace protocol { |
18 class ClientStub; | 18 class ClientStub; |
19 } | 19 } |
20 | 20 |
21 // Extends |ChromotingHost| with new functionality, and can use extension | 21 // Extends |ChromotingHost| with new functionality, and can use extension |
22 // messages to communicate with the client. | 22 // messages to communicate with the client. |
23 class HostExtension { | 23 class HostExtension { |
24 public: | 24 public: |
25 virtual ~HostExtension() {} | 25 virtual ~HostExtension() {} |
26 | 26 |
27 // Returns the name of the capability for this extension. This is merged into | 27 // Returns the name of the capability for this extension. This is merged into |
28 // the capabilities the host reports to the client, to determine whether a | 28 // the capabilities the host reports to the client, to determine whether a |
29 // HostExtensionSession should be created for a particular session. | 29 // HostExtensionSession should be created for a particular session. |
30 // Returning an empty string indicates that the extension is not associated | 30 // Returning an empty string indicates that the extension is not associated |
31 // with a capability. | 31 // with a capability. |
32 virtual std::string capability() const = 0; | 32 virtual std::string capability() const = 0; |
33 | 33 |
34 // Creates an extension session, which can handle extension messages for a | 34 // Creates an extension session, which can handle extension messages for a |
35 // client session. | 35 // client session. |
36 // |client_session_control| may be used to e.g. disconnect the session. | 36 // |client_session_control| may be used to e.g. disconnect the session. |
37 // |client_session_details| provides details about the current client session. | |
37 // |client_stub| may be used to send messages to the session. | 38 // |client_stub| may be used to send messages to the session. |
38 // Both interfaces are valid for the lifetime of the |HostExtensionSession|. | 39 // Both interfaces are valid for the lifetime of the |HostExtensionSession|. |
39 virtual std::unique_ptr<HostExtensionSession> CreateExtensionSession( | 40 virtual std::unique_ptr<HostExtensionSession> CreateExtensionSession( |
40 ClientSessionControl* client_session_control, | 41 ClientSessionControl* client_session_control, |
42 ClientSessionDetails* client_session_details, | |
Sergey Ulanov
2016/06/23 22:41:28
Do we really need to have ClientSessionDetails sep
| |
41 protocol::ClientStub* client_stub) = 0; | 43 protocol::ClientStub* client_stub) = 0; |
42 }; | 44 }; |
43 | 45 |
44 } // namespace remoting | 46 } // namespace remoting |
45 | 47 |
46 #endif // REMOTING_HOST_HOST_EXTENSION_H_ | 48 #endif // REMOTING_HOST_HOST_EXTENSION_H_ |
OLD | NEW |