OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DESKTOP_SESSION_CONNECTOR_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ |
6 #define REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ | 6 #define REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ipc/ipc_platform_file.h" |
9 | 10 |
10 namespace remoting { | 11 namespace remoting { |
11 | 12 |
12 class IpcDesktopEnvironment; | 13 class IpcDesktopEnvironment; |
13 | 14 |
14 // Provides a way to connect a terminal (i.e. a remote client) with a desktop | 15 // Provides a way to connect a terminal (i.e. a remote client) with a desktop |
15 // session (i.e. the screen, keyboard and the rest). | 16 // session (i.e. the screen, keyboard and the rest). |
16 class DesktopSessionConnector { | 17 class DesktopSessionConnector { |
17 public: | 18 public: |
18 DesktopSessionConnector() {} | 19 DesktopSessionConnector() {} |
19 virtual ~DesktopSessionConnector() {} | 20 virtual ~DesktopSessionConnector() {} |
20 | 21 |
21 // Requests the daemon process to create a desktop session and associates | 22 // Requests the daemon process to create a desktop session and associates |
22 // |desktop_environment| with it. | 23 // |desktop_environment| with it. |
23 virtual void ConnectTerminal(IpcDesktopEnvironment* desktop_environment) = 0; | 24 virtual void ConnectTerminal(IpcDesktopEnvironment* desktop_environment) = 0; |
24 | 25 |
25 // Requests the daemon process disconnect |desktop_environment| from | 26 // Requests the daemon process disconnect |desktop_environment| from |
26 // the associated desktop session. | 27 // the associated desktop session. |
27 virtual void DisconnectTerminal( | 28 virtual void DisconnectTerminal( |
28 IpcDesktopEnvironment* desktop_environment) = 0; | 29 IpcDesktopEnvironment* desktop_environment) = 0; |
29 | 30 |
| 31 // Notifies the network process that |terminal_id| is now attached to |
| 32 // a desktop integration process. |desktop_process| specifies the process |
| 33 // handle. |desktop_pipe| is the client end of the pipe opened by the desktop |
| 34 // process. |
| 35 virtual void OnDesktopSessionAgentAttached( |
| 36 int terminal_id, |
| 37 IPC::PlatformFileForTransit desktop_process, |
| 38 IPC::PlatformFileForTransit desktop_pipe) = 0; |
| 39 |
30 // Notifies the network process that the daemon has disconnected the desktop | 40 // Notifies the network process that the daemon has disconnected the desktop |
31 // session from the associated descktop environment. | 41 // session from the associated descktop environment. |
32 virtual void OnTerminalDisconnected(int terminal_id) = 0; | 42 virtual void OnTerminalDisconnected(int terminal_id) = 0; |
33 | 43 |
34 private: | 44 private: |
35 DISALLOW_COPY_AND_ASSIGN(DesktopSessionConnector); | 45 DISALLOW_COPY_AND_ASSIGN(DesktopSessionConnector); |
36 }; | 46 }; |
37 | 47 |
38 } // namespace remoting | 48 } // namespace remoting |
39 | 49 |
40 #endif // REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ | 50 #endif // REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ |
OLD | NEW |