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