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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_HOST_EXTENSION_H_
6 #define REMOTING_HOST_HOST_EXTENSION_H_
10 #include "base/memory/scoped_ptr.h"
14 class ClientSessionControl
;
15 class HostExtensionSession
;
21 // Extends |ChromotingHost| with new functionality, and can use extension
22 // messages to communicate with the client.
25 virtual ~HostExtension() {}
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
29 // HostExtensionSession should be created for a particular session.
30 // Returning an empty string indicates that the extension is not associated
32 virtual std::string
capability() const = 0;
34 // Creates an extension session, which can handle extension messages for a
36 // |client_session_control| may be used to e.g. disconnect the session.
37 // |client_stub| may be used to send messages to the session.
38 // Both interfaces are valid for the lifetime of the |HostExtensionSession|.
39 virtual scoped_ptr
<HostExtensionSession
> CreateExtensionSession(
40 ClientSessionControl
* client_session_control
,
41 protocol::ClientStub
* client_stub
) = 0;
44 } // namespace remoting
46 #endif // REMOTING_HOST_HOST_EXTENSION_H_