Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: remoting/host/chromoting_host.h

Issue 11778049: Making DesktopEnvironment a factory class used by ClientSession to create audio/video capturers and… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_CHROMOTING_HOST_H_ 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_
6 #define REMOTING_HOST_CHROMOTING_HOST_H_ 6 #define REMOTING_HOST_CHROMOTING_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 public MouseMoveObserver { 66 public MouseMoveObserver {
67 public: 67 public:
68 // The caller must ensure that |signal_strategy| and 68 // The caller must ensure that |signal_strategy| and
69 // |desktop_environment_factory| remain valid at least until the 69 // |desktop_environment_factory| remain valid at least until the
70 // |shutdown_task| supplied to Shutdown() has been notified. 70 // |shutdown_task| supplied to Shutdown() has been notified.
71 ChromotingHost( 71 ChromotingHost(
72 SignalStrategy* signal_strategy, 72 SignalStrategy* signal_strategy,
73 DesktopEnvironmentFactory* desktop_environment_factory, 73 DesktopEnvironmentFactory* desktop_environment_factory,
74 scoped_ptr<protocol::SessionManager> session_manager, 74 scoped_ptr<protocol::SessionManager> session_manager,
75 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 75 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
76 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
76 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 77 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
77 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, 78 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
78 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); 79 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
80 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
79 81
80 // Asynchronously start the host process. 82 // Asynchronously start the host process.
81 // 83 //
82 // After this is invoked, the host process will connect to the talk 84 // After this is invoked, the host process will connect to the talk
83 // network and start listening for incoming connections. 85 // network and start listening for incoming connections.
84 // 86 //
85 // This method can only be called once during the lifetime of this object. 87 // This method can only be called once during the lifetime of this object.
86 void Start(const std::string& xmpp_login); 88 void Start(const std::string& xmpp_login);
87 89
88 // Asynchronously shutdown the host process. |shutdown_task| is 90 // Asynchronously shutdown the host process. |shutdown_task| is
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 164
163 enum State { 165 enum State {
164 kInitial, 166 kInitial,
165 kStarted, 167 kStarted,
166 kStopping, 168 kStopping,
167 kStopped, 169 kStopped,
168 }; 170 };
169 171
170 virtual ~ChromotingHost(); 172 virtual ~ChromotingHost();
171 173
172 // Called when a client session is stopped completely.
173 void OnClientStopped();
174
175 // Called from Shutdown() to finish shutdown. 174 // Called from Shutdown() to finish shutdown.
176 void ShutdownFinish(); 175 void ShutdownFinish();
177 176
178 // Unless specified otherwise all members of this class must be 177 // Unless specified otherwise all members of this class must be
179 // used on the network thread only. 178 // used on the network thread only.
180 179
181 // Parameters specified when the host was created. 180 // Parameters specified when the host was created.
182 DesktopEnvironmentFactory* desktop_environment_factory_; 181 DesktopEnvironmentFactory* desktop_environment_factory_;
183 scoped_ptr<protocol::SessionManager> session_manager_; 182 scoped_ptr<protocol::SessionManager> session_manager_;
184 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; 183 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
184 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
185 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner_; 185 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner_;
186 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; 186 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
187 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 187 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
188 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
188 189
189 // Connection objects. 190 // Connection objects.
190 SignalStrategy* signal_strategy_; 191 SignalStrategy* signal_strategy_;
191 192
192 // Must be used on the network thread only. 193 // Must be used on the network thread only.
193 ObserverList<HostStatusObserver> status_observers_; 194 ObserverList<HostStatusObserver> status_observers_;
194 195
195 // The connections to remote clients. 196 // The connections to remote clients.
196 ClientList clients_; 197 ClientList clients_;
197 198
(...skipping 25 matching lines...) Expand all
223 224
224 // The maximum duration of any session. 225 // The maximum duration of any session.
225 base::TimeDelta max_session_duration_; 226 base::TimeDelta max_session_duration_;
226 227
227 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); 228 DISALLOW_COPY_AND_ASSIGN(ChromotingHost);
228 }; 229 };
229 230
230 } // namespace remoting 231 } // namespace remoting
231 232
232 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ 233 #endif // REMOTING_HOST_CHROMOTING_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698