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

Unified Diff: remoting/host/client_session.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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index f61cb53a78d04b2719ddfa1af3e196403d0ca536..a64f707b704a48f483dd8f67db5c3330a0ef0d77 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -8,6 +8,7 @@
#include <list>
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/time.h"
#include "base/timer.h"
@@ -36,8 +37,8 @@ class AudioScheduler;
struct ClientSessionTraits;
class DesktopEnvironment;
class DesktopEnvironmentFactory;
+class EventExecutor;
class VideoEncoder;
-class VideoFrameCapturer;
class VideoScheduler;
// A ClientSession keeps a reference to a connection to a client, and maintains
@@ -91,9 +92,11 @@ class ClientSession
ClientSession(
EventHandler* event_handler,
scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
scoped_ptr<protocol::ConnectionToClient> connection,
DesktopEnvironmentFactory* desktop_environment_factory,
const base::TimeDelta& max_duration);
@@ -125,9 +128,8 @@ class ClientSession
// method returns.
void Disconnect();
- // Stops the ClientSession, and calls |stopped_task| on |network_task_runner_|
- // when fully stopped.
- void Stop(const base::Closure& stopped_task);
+ // Stops the ClientSession.
Wez 2013/01/11 02:23:41 Clarify that the semantics; once ClientSession is
alexeypa (please no reviews) 2013/01/11 19:59:46 Done.
+ void Stop();
protocol::ConnectionToClient* connection() const {
return connection_.get();
@@ -154,8 +156,6 @@ class ClientSession
// Creates a proxy for sending clipboard events to the client.
scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy();
- void OnRecorderStopped();
-
// Creates an audio encoder for the specified configuration.
static scoped_ptr<AudioEncoder> CreateAudioEncoder(
const protocol::SessionConfig& config);
@@ -172,11 +172,11 @@ class ClientSession
// Used to disable callbacks to |connection_| once it is disconnected.
base::WeakPtrFactory<protocol::ConnectionToClient> connection_factory_;
+ std::string client_jid_;
+
// The desktop environment used by this session.
scoped_ptr<DesktopEnvironment> desktop_environment_;
- std::string client_jid_;
-
// Filter used as the final element in the input pipeline.
protocol::InputFilter host_input_filter_;
@@ -216,21 +216,17 @@ class ClientSession
base::OneShotTimer<ClientSession> max_duration_timer_;
scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
// Schedulers for audio and video capture.
scoped_refptr<AudioScheduler> audio_scheduler_;
scoped_refptr<VideoScheduler> video_scheduler_;
- // Number of screen recorders and audio schedulers that are currently being
- // used or shutdown. Used to delay shutdown if one or more
- // recorders/schedulers are asynchronously shutting down.
- int active_recorders_;
-
- // Task to execute once the session is completely stopped.
- base::Closure stopped_task_;
+ scoped_ptr<EventExecutor> event_executor_;
DISALLOW_COPY_AND_ASSIGN(ClientSession);
};

Powered by Google App Engine
This is Rietveld 408576698