Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: remoting/host/host_extension.h

Issue 2091553002: Expose ClientSession details to Host Extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@desktop_environment
Patch Set: Adressing feedback Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/fake_host_extension.cc ('k') | remoting/host/host_extension_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ClientSessionDetails;
15 class HostExtensionSession; 14 class HostExtensionSession;
16 15
17 namespace protocol { 16 namespace protocol {
18 class ClientStub; 17 class ClientStub;
19 } 18 }
20 19
21 // Extends |ChromotingHost| with new functionality, and can use extension 20 // Extends |ChromotingHost| with new functionality, and can use extension
22 // messages to communicate with the client. 21 // messages to communicate with the client.
23 class HostExtension { 22 class HostExtension {
24 public: 23 public:
25 virtual ~HostExtension() {} 24 virtual ~HostExtension() {}
26 25
27 // Returns the name of the capability for this extension. This is merged into 26 // 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 27 // the capabilities the host reports to the client, to determine whether a
29 // HostExtensionSession should be created for a particular session. 28 // HostExtensionSession should be created for a particular session.
30 // Returning an empty string indicates that the extension is not associated 29 // Returning an empty string indicates that the extension is not associated
31 // with a capability. 30 // with a capability.
32 virtual std::string capability() const = 0; 31 virtual std::string capability() const = 0;
33 32
34 // Creates an extension session, which can handle extension messages for a 33 // Creates an extension session, which handles extension messages for a
35 // client session. 34 // client session.
36 // |client_session_control| may be used to e.g. disconnect the session. 35 // |client_session_details| provides session details and control methods.
37 // |client_stub| may be used to send messages to the session. 36 // |client_stub| may be used to send messages to the session.
38 // Both interfaces are valid for the lifetime of the |HostExtensionSession|. 37 // Both interfaces are valid for the lifetime of the |HostExtensionSession|.
39 virtual std::unique_ptr<HostExtensionSession> CreateExtensionSession( 38 virtual std::unique_ptr<HostExtensionSession> CreateExtensionSession(
40 ClientSessionControl* client_session_control, 39 ClientSessionDetails* client_session_details,
41 protocol::ClientStub* client_stub) = 0; 40 protocol::ClientStub* client_stub) = 0;
42 }; 41 };
43 42
44 } // namespace remoting 43 } // namespace remoting
45 44
46 #endif // REMOTING_HOST_HOST_EXTENSION_H_ 45 #endif // REMOTING_HOST_HOST_EXTENSION_H_
OLDNEW
« no previous file with comments | « remoting/host/fake_host_extension.cc ('k') | remoting/host/host_extension_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698