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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); | 85 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); |
86 std::string GetCapabilities() const; | 86 std::string GetCapabilities() const; |
87 void SetCapabilities(const std::string& capabilities); | 87 void SetCapabilities(const std::string& capabilities); |
88 | 88 |
89 // IPC::Listener implementation. | 89 // IPC::Listener implementation. |
90 bool OnMessageReceived(const IPC::Message& message) override; | 90 bool OnMessageReceived(const IPC::Message& message) override; |
91 void OnChannelConnected(int32 peer_pid) override; | 91 void OnChannelConnected(int32 peer_pid) override; |
92 void OnChannelError() override; | 92 void OnChannelError() override; |
93 | 93 |
94 // Connects to the desktop session agent. | 94 // Connects to the desktop session agent. |
95 bool AttachToDesktop(base::ProcessHandle desktop_process, | 95 bool AttachToDesktop(base::Process desktop_process, |
96 IPC::PlatformFileForTransit desktop_pipe); | 96 IPC::PlatformFileForTransit desktop_pipe); |
97 | 97 |
98 // Closes the connection to the desktop session agent and cleans up | 98 // Closes the connection to the desktop session agent and cleans up |
99 // the associated resources. | 99 // the associated resources. |
100 void DetachFromDesktop(); | 100 void DetachFromDesktop(); |
101 | 101 |
102 // Disconnects the client session that owns |this|. | 102 // Disconnects the client session that owns |this|. |
103 void DisconnectSession(); | 103 void DisconnectSession(); |
104 | 104 |
105 // 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 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Points to the video capturer receiving captured video frames. | 202 // Points to the video capturer receiving captured video frames. |
203 base::WeakPtr<IpcVideoFrameCapturer> video_capturer_; | 203 base::WeakPtr<IpcVideoFrameCapturer> video_capturer_; |
204 | 204 |
205 // Points to the mouse cursor monitor receiving mouse cursor changes. | 205 // Points to the mouse cursor monitor receiving mouse cursor changes. |
206 base::WeakPtr<IpcMouseCursorMonitor> mouse_cursor_monitor_; | 206 base::WeakPtr<IpcMouseCursorMonitor> mouse_cursor_monitor_; |
207 | 207 |
208 // IPC channel to the desktop session agent. | 208 // IPC channel to the desktop session agent. |
209 scoped_ptr<IPC::ChannelProxy> desktop_channel_; | 209 scoped_ptr<IPC::ChannelProxy> desktop_channel_; |
210 | 210 |
211 // Handle of the desktop process. | 211 // Handle of the desktop process. |
212 base::ProcessHandle desktop_process_; | 212 base::Process desktop_process_; |
213 | 213 |
214 int pending_capture_frame_requests_; | 214 int pending_capture_frame_requests_; |
215 | 215 |
216 // Shared memory buffers by Id. Each buffer is owned by the corresponding | 216 // Shared memory buffers by Id. Each buffer is owned by the corresponding |
217 // frame. | 217 // frame. |
218 SharedBuffers shared_buffers_; | 218 SharedBuffers shared_buffers_; |
219 | 219 |
220 // Keeps the desired screen resolution so it can be passed to a newly attached | 220 // Keeps the desired screen resolution so it can be passed to a newly attached |
221 // desktop session agent. | 221 // desktop session agent. |
222 ScreenResolution screen_resolution_; | 222 ScreenResolution screen_resolution_; |
223 | 223 |
224 // True if |this| has been connected to the desktop session. | 224 // True if |this| has been connected to the desktop session. |
225 bool is_desktop_session_connected_; | 225 bool is_desktop_session_connected_; |
226 | 226 |
227 bool virtual_terminal_; | 227 bool virtual_terminal_; |
228 | 228 |
229 DISALLOW_COPY_AND_ASSIGN(DesktopSessionProxy); | 229 DISALLOW_COPY_AND_ASSIGN(DesktopSessionProxy); |
230 }; | 230 }; |
231 | 231 |
232 // Destroys |DesktopSessionProxy| instances on the caller's thread. | 232 // Destroys |DesktopSessionProxy| instances on the caller's thread. |
233 struct DesktopSessionProxyTraits { | 233 struct DesktopSessionProxyTraits { |
234 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); | 234 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); |
235 }; | 235 }; |
236 | 236 |
237 } // namespace remoting | 237 } // namespace remoting |
238 | 238 |
239 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 239 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
OLD | NEW |