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

Unified Diff: remoting/host/session_manager.h

Issue 2829018: Fix thread usage in chromoting host (Closed)
Patch Set: removed useless test Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/encoder_verbatim.cc ('k') | remoting/host/session_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/session_manager.h
diff --git a/remoting/host/session_manager.h b/remoting/host/session_manager.h
index 9c8ad50d8d10edb79721a34019577c4bde78fea2..d624a356772efea0d9bcf7ee1fd832f003502c20 100644
--- a/remoting/host/session_manager.h
+++ b/remoting/host/session_manager.h
@@ -67,7 +67,7 @@ class SessionManager : public base::RefCountedThreadSafe<SessionManager> {
public:
// Construct a SessionManager. Message loops and threads are provided.
- // Ownership of Capturer and Encoder are given to this object.
+ // This object does not own capturer and encoder.
SessionManager(MessageLoop* capture_loop,
MessageLoop* encode_loop,
MessageLoop* network_loop,
@@ -95,6 +95,9 @@ class SessionManager : public base::RefCountedThreadSafe<SessionManager> {
// Remove a client from receiving screen updates.
void RemoveClient(scoped_refptr<ClientConnection> client);
+ // Remove all clients.
+ void RemoveAllClients();
+
private:
// Stores the data and information of a capture to pass off to the
@@ -130,6 +133,7 @@ class SessionManager : public base::RefCountedThreadSafe<SessionManager> {
void DoSetMaxRate(double max_rate);
void DoAddClient(scoped_refptr<ClientConnection> client);
void DoRemoveClient(scoped_refptr<ClientConnection> client);
+ void DoRemoveAllClients();
void DoRateControl();
// Hepler method to schedule next capture using the current rate.
@@ -145,6 +149,10 @@ class SessionManager : public base::RefCountedThreadSafe<SessionManager> {
const scoped_refptr<media::DataBuffer>& data,
Encoder::EncodingState state);
+ // Getters for capturer and encoder.
+ Capturer* capturer();
+ Encoder* encoder();
+
// Message loops used by this class.
MessageLoop* capture_loop_;
MessageLoop* encode_loop_;
« no previous file with comments | « remoting/host/encoder_verbatim.cc ('k') | remoting/host/session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698