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

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

Issue 11260053: Use correct thread for audio capturing and encoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 public protocol::SessionManager::Listener, 65 public protocol::SessionManager::Listener,
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> capture_task_runner, 76 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
76 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, 77 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
77 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); 78 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner);
78 79
79 // Asynchronously start the host process. 80 // Asynchronously start the host process.
80 // 81 //
81 // After this is invoked, the host process will connect to the talk 82 // After this is invoked, the host process will connect to the talk
82 // network and start listening for incoming connections. 83 // network and start listening for incoming connections.
83 // 84 //
84 // This method can only be called once during the lifetime of this object. 85 // This method can only be called once during the lifetime of this object.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 // Called from Shutdown() to finish shutdown. 178 // Called from Shutdown() to finish shutdown.
178 void ShutdownFinish(); 179 void ShutdownFinish();
179 180
180 // Unless specified otherwise all members of this class must be 181 // Unless specified otherwise all members of this class must be
181 // used on the network thread only. 182 // used on the network thread only.
182 183
183 // Parameters specified when the host was created. 184 // Parameters specified when the host was created.
184 DesktopEnvironmentFactory* desktop_environment_factory_; 185 DesktopEnvironmentFactory* desktop_environment_factory_;
185 scoped_ptr<protocol::SessionManager> session_manager_; 186 scoped_ptr<protocol::SessionManager> session_manager_;
187 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
186 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; 188 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
187 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_; 189 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
188 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 190 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
189 191
190 // Connection objects. 192 // Connection objects.
191 SignalStrategy* signal_strategy_; 193 SignalStrategy* signal_strategy_;
192 194
193 // Must be used on the network thread only. 195 // Must be used on the network thread only.
194 ObserverList<HostStatusObserver> status_observers_; 196 ObserverList<HostStatusObserver> status_observers_;
195 197
(...skipping 28 matching lines...) Expand all
224 226
225 // The maximum duration of any session. 227 // The maximum duration of any session.
226 base::TimeDelta max_session_duration_; 228 base::TimeDelta max_session_duration_;
227 229
228 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); 230 DISALLOW_COPY_AND_ASSIGN(ChromotingHost);
229 }; 231 };
230 232
231 } // namespace remoting 233 } // namespace remoting
232 234
233 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ 235 #endif // REMOTING_HOST_CHROMOTING_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698