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

Unified Diff: remoting/host/ipc_desktop_environment.h

Issue 12879006: Removed task runners from the DesktopEnviroment interface and introduced ScreenControls/ClientSessio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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/host_mock_objects.cc ('k') | remoting/host/ipc_desktop_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment.h
diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h
index bf5aaff10dd8c70e1dc8b39fdf0788d4ad9188d5..b4a8818724e3af8fa81bc9d708aa99884375344b 100644
--- a/remoting/host/ipc_desktop_environment.h
+++ b/remoting/host/ipc_desktop_environment.h
@@ -27,6 +27,7 @@ class Sender;
namespace remoting {
+class ClientSessionControl;
class DesktopSessionProxy;
class ScreenResolution;
@@ -38,29 +39,22 @@ class IpcDesktopEnvironment : public DesktopEnvironment {
// a desktop session, to be notified every time the desktop process is
// restarted.
IpcDesktopEnvironment(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const std::string& client_jid,
- const base::Closure& disconnect_callback,
+ base::WeakPtr<ClientSessionControl> client_session_control,
base::WeakPtr<DesktopSessionConnector> desktop_session_connector,
bool virtual_terminal);
virtual ~IpcDesktopEnvironment();
// DesktopEnvironment implementation.
- virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
- scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE;
- virtual scoped_ptr<InputInjector> CreateInputInjector(
- scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE;
- virtual scoped_ptr<SessionController> CreateSessionController() OVERRIDE;
- virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer(
- scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE;
+ virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
+ virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
+ virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
+ virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
private:
- // Task runner on which public methods of this class should be called.
- scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
-
scoped_refptr<DesktopSessionProxy> desktop_session_proxy_;
DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment);
@@ -76,7 +70,9 @@ class IpcDesktopEnvironmentFactory
// Passes a reference to the IPC channel connected to the daemon process and
// relevant task runners. |daemon_channel| must outlive this object.
IpcDesktopEnvironmentFactory(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
IPC::Sender* daemon_channel);
virtual ~IpcDesktopEnvironmentFactory();
@@ -86,8 +82,7 @@ class IpcDesktopEnvironmentFactory
// DesktopEnvironmentFactory implementation.
virtual scoped_ptr<DesktopEnvironment> Create(
- const std::string& client_jid,
- const base::Closure& disconnect_callback) OVERRIDE;
+ base::WeakPtr<ClientSessionControl> client_session_control) OVERRIDE;
virtual bool SupportsAudioCapture() const OVERRIDE;
// DesktopSessionConnector implementation.
@@ -107,9 +102,16 @@ class IpcDesktopEnvironmentFactory
virtual void OnTerminalDisconnected(int terminal_id) OVERRIDE;
private:
- // Task runner on which public methods of this class should be called.
+ // Used to run the audio capturer.
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
+
+ // Task runner on which methods of DesktopEnvironmentFactory interface should
+ // be called.
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
+ // Used to run the video capturer.
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
+
// Task runner used for running background I/O.
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
« no previous file with comments | « remoting/host/host_mock_objects.cc ('k') | remoting/host/ipc_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698