| 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_IPC_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
| 6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
| 22 } // base | 22 } // base |
| 23 | 23 |
| 24 namespace IPC { | 24 namespace IPC { |
| 25 class Sender; | 25 class Sender; |
| 26 } // namespace IPC | 26 } // namespace IPC |
| 27 | 27 |
| 28 namespace remoting { | 28 namespace remoting { |
| 29 | 29 |
| 30 class DesktopSessionProxy; | 30 class DesktopSessionProxy; |
| 31 struct DesktopSessionParams; | 31 struct ScreenResolution; |
| 32 | 32 |
| 33 // A variant of desktop environment integrating with the desktop by means of | 33 // A variant of desktop environment integrating with the desktop by means of |
| 34 // a helper process and talking to that process via IPC. | 34 // a helper process and talking to that process via IPC. |
| 35 class IpcDesktopEnvironment : public DesktopEnvironment { | 35 class IpcDesktopEnvironment : public DesktopEnvironment { |
| 36 public: | 36 public: |
| 37 // |desktop_session_connector| is used to bind DesktopSessionProxy to | 37 // |desktop_session_connector| is used to bind DesktopSessionProxy to |
| 38 // a desktop session, to be notified every time the desktop process is | 38 // a desktop session, to be notified every time the desktop process is |
| 39 // restarted. | 39 // restarted. |
| 40 IpcDesktopEnvironment( | 40 IpcDesktopEnvironment( |
| 41 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 41 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // DesktopEnvironmentFactory implementation. | 87 // DesktopEnvironmentFactory implementation. |
| 88 virtual scoped_ptr<DesktopEnvironment> Create( | 88 virtual scoped_ptr<DesktopEnvironment> Create( |
| 89 const std::string& client_jid, | 89 const std::string& client_jid, |
| 90 const base::Closure& disconnect_callback) OVERRIDE; | 90 const base::Closure& disconnect_callback) OVERRIDE; |
| 91 virtual bool SupportsAudioCapture() const OVERRIDE; | 91 virtual bool SupportsAudioCapture() const OVERRIDE; |
| 92 | 92 |
| 93 // DesktopSessionConnector implementation. | 93 // DesktopSessionConnector implementation. |
| 94 virtual void ConnectTerminal( | 94 virtual void ConnectTerminal( |
| 95 DesktopSessionProxy* desktop_session_proxy, | 95 DesktopSessionProxy* desktop_session_proxy, |
| 96 const DesktopSessionParams& params, | 96 const ScreenResolution& resolution, |
| 97 bool virtual_terminal) OVERRIDE; | 97 bool virtual_terminal) OVERRIDE; |
| 98 virtual void DisconnectTerminal( | 98 virtual void DisconnectTerminal( |
| 99 DesktopSessionProxy* desktop_session_proxy) OVERRIDE; | 99 DesktopSessionProxy* desktop_session_proxy) OVERRIDE; |
| 100 virtual void OnDesktopSessionAgentAttached( | 100 virtual void OnDesktopSessionAgentAttached( |
| 101 int terminal_id, | 101 int terminal_id, |
| 102 base::ProcessHandle desktop_process, | 102 base::ProcessHandle desktop_process, |
| 103 IPC::PlatformFileForTransit desktop_pipe) OVERRIDE; | 103 IPC::PlatformFileForTransit desktop_pipe) OVERRIDE; |
| 104 virtual void OnTerminalDisconnected(int terminal_id) OVERRIDE; | 104 virtual void OnTerminalDisconnected(int terminal_id) OVERRIDE; |
| 105 | 105 |
| 106 private: | 106 private: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 127 // This gives us more than 67 years of unique IDs assuming a new ID is | 127 // This gives us more than 67 years of unique IDs assuming a new ID is |
| 128 // allocated every second. | 128 // allocated every second. |
| 129 int next_id_; | 129 int next_id_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); | 131 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace remoting | 134 } // namespace remoting |
| 135 | 135 |
| 136 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ | 136 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ |
| OLD | NEW |