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_AGENT_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ |
6 #define REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ | 6 #define REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Posted to |video_capture_task_runner_| to stop the video capturer. | 146 // Posted to |video_capture_task_runner_| to stop the video capturer. |
147 void StopVideoCapturer(); | 147 void StopVideoCapturer(); |
148 | 148 |
149 private: | 149 private: |
150 class SharedBuffer; | 150 class SharedBuffer; |
151 friend class SharedBuffer; | 151 friend class SharedBuffer; |
152 | 152 |
153 // Called by SharedBuffer when it's destroyed. | 153 // Called by SharedBuffer when it's destroyed. |
154 void OnSharedBufferDeleted(int id); | 154 void OnSharedBufferDeleted(int id); |
155 | 155 |
156 // Closes |desktop_pipe_| if it is open. | |
157 void CloseDesktopPipeHandle(); | |
158 | |
159 // Task runner dedicated to running methods of |audio_capturer_|. | 156 // Task runner dedicated to running methods of |audio_capturer_|. |
160 scoped_refptr<AutoThreadTaskRunner> audio_capture_task_runner_; | 157 scoped_refptr<AutoThreadTaskRunner> audio_capture_task_runner_; |
161 | 158 |
162 // Task runner on which public methods of this class should be called. | 159 // Task runner on which public methods of this class should be called. |
163 scoped_refptr<AutoThreadTaskRunner> caller_task_runner_; | 160 scoped_refptr<AutoThreadTaskRunner> caller_task_runner_; |
164 | 161 |
165 // Task runner on which keyboard/mouse input is injected. | 162 // Task runner on which keyboard/mouse input is injected. |
166 scoped_refptr<AutoThreadTaskRunner> input_task_runner_; | 163 scoped_refptr<AutoThreadTaskRunner> input_task_runner_; |
167 | 164 |
168 // Task runner used by the IPC channel. | 165 // Task runner used by the IPC channel. |
(...skipping 25 matching lines...) Expand all Loading... |
194 scoped_ptr<RemoteInputFilter> remote_input_filter_; | 191 scoped_ptr<RemoteInputFilter> remote_input_filter_; |
195 | 192 |
196 // Used to apply client-requested changes in screen resolution. | 193 // Used to apply client-requested changes in screen resolution. |
197 scoped_ptr<ScreenControls> screen_controls_; | 194 scoped_ptr<ScreenControls> screen_controls_; |
198 | 195 |
199 // IPC channel connecting the desktop process with the network process. | 196 // IPC channel connecting the desktop process with the network process. |
200 scoped_ptr<IPC::ChannelProxy> network_channel_; | 197 scoped_ptr<IPC::ChannelProxy> network_channel_; |
201 | 198 |
202 // The client end of the network-to-desktop pipe. It is kept alive until | 199 // The client end of the network-to-desktop pipe. It is kept alive until |
203 // the network process connects to the pipe. | 200 // the network process connects to the pipe. |
204 IPC::PlatformFileForTransit desktop_pipe_; | 201 base::File desktop_pipe_; |
205 | 202 |
206 // Size of the most recent captured video frame. | 203 // Size of the most recent captured video frame. |
207 webrtc::DesktopSize current_size_; | 204 webrtc::DesktopSize current_size_; |
208 | 205 |
209 // Next shared buffer ID to be used. | 206 // Next shared buffer ID to be used. |
210 int next_shared_buffer_id_; | 207 int next_shared_buffer_id_; |
211 | 208 |
212 // The number of currently allocated shared buffers. | 209 // The number of currently allocated shared buffers. |
213 int shared_buffers_; | 210 int shared_buffers_; |
214 | 211 |
215 // True if the desktop session agent has been started. | 212 // True if the desktop session agent has been started. |
216 bool started_; | 213 bool started_; |
217 | 214 |
218 // Captures the screen. | 215 // Captures the screen. |
219 scoped_ptr<webrtc::ScreenCapturer> video_capturer_; | 216 scoped_ptr<webrtc::ScreenCapturer> video_capturer_; |
220 | 217 |
221 // Keep reference to the last frame sent to make sure shared buffer is alive | 218 // Keep reference to the last frame sent to make sure shared buffer is alive |
222 // before it's received. | 219 // before it's received. |
223 scoped_ptr<webrtc::DesktopFrame> last_frame_; | 220 scoped_ptr<webrtc::DesktopFrame> last_frame_; |
224 | 221 |
225 DISALLOW_COPY_AND_ASSIGN(DesktopSessionAgent); | 222 DISALLOW_COPY_AND_ASSIGN(DesktopSessionAgent); |
226 }; | 223 }; |
227 | 224 |
228 } // namespace remoting | 225 } // namespace remoting |
229 | 226 |
230 #endif // REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ | 227 #endif // REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ |
OLD | NEW |