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

Unified Diff: remoting/host/client_session.h

Issue 11761019: Tiny little refactoring of DesktopEnvironment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index c4e06570f352bd5d4e2d82cf5909c523a24003fc..61a8dc7e25e6b8f37b026d4886c000fbd14a124b 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -32,13 +32,10 @@ class SingleThreadTaskRunner;
namespace remoting {
class AudioEncoder;
-class AudioScheduler;
struct ClientSessionTraits;
class DesktopEnvironment;
class DesktopEnvironmentFactory;
class VideoEncoder;
-class VideoFrameCapturer;
-class VideoScheduler;
// A ClientSession keeps a reference to a connection to a client, and maintains
// per-client state.
@@ -91,9 +88,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 +124,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.
+ void Stop();
protocol::ConnectionToClient* connection() const {
return connection_.get();
@@ -155,11 +153,6 @@ class ClientSession
friend struct ClientSessionTraits;
virtual ~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);
@@ -176,11 +169,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_;
-
// The host clipboard and input stubs to which this object delegates.
// These are the final elements in the clipboard & input pipelines, which
// appear in order below.
@@ -208,11 +201,6 @@ class ClientSession
protocol::InputFilter auth_input_filter_;
protocol::ClipboardFilter auth_clipboard_filter_;
- // Factory for weak pointers to the client clipboard stub.
- // This must appear after |clipboard_echo_filter_|, so that it won't outlive
- // it.
- base::WeakPtrFactory<protocol::ClipboardStub> client_clipboard_factory_;
-
// The maximum duration of this session.
// There is no maximum if this value is <= 0.
base::TimeDelta max_duration_;
@@ -222,21 +210,11 @@ 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_;
-
- // 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_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
DISALLOW_COPY_AND_ASSIGN(ClientSession);
};
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698