Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / remoting / host / host_extension.h
blob41158e6e965376f86634f8a05fea9e0e3c0d6bf3
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_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace remoting {
14 class ClientSessionControl;
15 class HostExtensionSession;
17 namespace protocol {
18 class ClientStub;
21 // Extends |ChromotingHost| with new functionality, and can use extension
22 // messages to communicate with the client.
23 class HostExtension {
24 public:
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
31 // with a capability.
32 virtual std::string capability() const = 0;
34 // Creates an extension session, which can handle extension messages for a
35 // client session.
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_