| 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_PROXY_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
| 6 #define REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 6 #define REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 namespace IPC { | 29 namespace IPC { |
| 30 class ChannelProxy; | 30 class ChannelProxy; |
| 31 class Message; | 31 class Message; |
| 32 } // namespace IPC | 32 } // namespace IPC |
| 33 | 33 |
| 34 namespace webrtc { | 34 namespace webrtc { |
| 35 class MouseCursor; | 35 class MouseCursor; |
| 36 } // namespace webrtc | 36 } // namespace webrtc |
| 37 | 37 |
| 38 struct SerializedDesktopFrame; | 38 struct SerializedDesktopFrame; |
| 39 struct SerializedMouseCursor; | |
| 40 | 39 |
| 41 namespace remoting { | 40 namespace remoting { |
| 42 | 41 |
| 43 class AudioPacket; | 42 class AudioPacket; |
| 44 class ClientSession; | 43 class ClientSession; |
| 45 class ClientSessionControl; | 44 class ClientSessionControl; |
| 46 class DesktopSessionConnector; | 45 class DesktopSessionConnector; |
| 47 struct DesktopSessionProxyTraits; | 46 struct DesktopSessionProxyTraits; |
| 48 class IpcAudioCapturer; | 47 class IpcAudioCapturer; |
| 49 class IpcMouseCursorMonitor; | 48 class IpcMouseCursorMonitor; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 75 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 74 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 76 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, | 75 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
| 77 base::WeakPtr<ClientSessionControl> client_session_control, | 76 base::WeakPtr<ClientSessionControl> client_session_control, |
| 78 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, | 77 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, |
| 79 bool virtual_terminal); | 78 bool virtual_terminal); |
| 80 | 79 |
| 81 // Mirrors DesktopEnvironment. | 80 // Mirrors DesktopEnvironment. |
| 82 scoped_ptr<AudioCapturer> CreateAudioCapturer(); | 81 scoped_ptr<AudioCapturer> CreateAudioCapturer(); |
| 83 scoped_ptr<InputInjector> CreateInputInjector(); | 82 scoped_ptr<InputInjector> CreateInputInjector(); |
| 84 scoped_ptr<ScreenControls> CreateScreenControls(); | 83 scoped_ptr<ScreenControls> CreateScreenControls(); |
| 85 scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer(); | 84 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer(); |
| 86 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); | 85 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); |
| 87 std::string GetCapabilities() const; | 86 std::string GetCapabilities() const; |
| 88 void SetCapabilities(const std::string& capabilities); | 87 void SetCapabilities(const std::string& capabilities); |
| 89 | 88 |
| 90 // IPC::Listener implementation. | 89 // IPC::Listener implementation. |
| 91 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 90 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 92 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 91 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 93 virtual void OnChannelError() OVERRIDE; | 92 virtual void OnChannelError() OVERRIDE; |
| 94 | 93 |
| 95 // Connects to the desktop session agent. | 94 // Connects to the desktop session agent. |
| 96 bool AttachToDesktop(base::ProcessHandle desktop_process, | 95 bool AttachToDesktop(base::ProcessHandle desktop_process, |
| 97 IPC::PlatformFileForTransit desktop_pipe); | 96 IPC::PlatformFileForTransit desktop_pipe); |
| 98 | 97 |
| 99 // Closes the connection to the desktop session agent and cleans up | 98 // Closes the connection to the desktop session agent and cleans up |
| 100 // the associated resources. | 99 // the associated resources. |
| 101 void DetachFromDesktop(); | 100 void DetachFromDesktop(); |
| 102 | 101 |
| 103 // Disconnects the client session that owns |this|. | 102 // Disconnects the client session that owns |this|. |
| 104 void DisconnectSession(); | 103 void DisconnectSession(); |
| 105 | 104 |
| 106 // Stores |audio_capturer| to be used to post captured audio packets. Called | 105 // Stores |audio_capturer| to be used to post captured audio packets. Called |
| 107 // on the |audio_capture_task_runner_| thread. | 106 // on the |audio_capture_task_runner_| thread. |
| 108 void SetAudioCapturer(const base::WeakPtr<IpcAudioCapturer>& audio_capturer); | 107 void SetAudioCapturer(const base::WeakPtr<IpcAudioCapturer>& audio_capturer); |
| 109 | 108 |
| 110 // APIs used to implement the webrtc::ScreenCapturer interface. These must be | 109 // APIs used to implement the webrtc::DesktopCapturer interface. These must be |
| 111 // called on the |video_capture_task_runner_| thread. | 110 // called on the |video_capture_task_runner_| thread. |
| 112 void CaptureFrame(); | 111 void CaptureFrame(); |
| 113 | 112 |
| 114 // Stores |video_capturer| to be used to post captured video frames. Called on | 113 // Stores |video_capturer| to be used to post captured video frames. Called on |
| 115 // the |video_capture_task_runner_| thread. | 114 // the |video_capture_task_runner_| thread. |
| 116 void SetVideoCapturer( | 115 void SetVideoCapturer( |
| 117 const base::WeakPtr<IpcVideoFrameCapturer> video_capturer); | 116 const base::WeakPtr<IpcVideoFrameCapturer> video_capturer); |
| 118 | 117 |
| 119 // Stores |mouse_cursor_monitor| to be used to post mouse cursor changes. | 118 // Stores |mouse_cursor_monitor| to be used to post mouse cursor changes. |
| 120 // Called on the |video_capture_task_runner_| thread. | 119 // Called on the |video_capture_task_runner_| thread. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 }; | 230 }; |
| 232 | 231 |
| 233 // Destroys |DesktopSessionProxy| instances on the caller's thread. | 232 // Destroys |DesktopSessionProxy| instances on the caller's thread. |
| 234 struct DesktopSessionProxyTraits { | 233 struct DesktopSessionProxyTraits { |
| 235 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); | 234 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); |
| 236 }; | 235 }; |
| 237 | 236 |
| 238 } // namespace remoting | 237 } // namespace remoting |
| 239 | 238 |
| 240 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 239 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
| OLD | NEW |