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

Unified Diff: remoting/host/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/client_session_unittest.cc ('k') | remoting/host/desktop_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_environment.h
diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h
index 7f2ed5490c01883fb9f994144fef86cbf075e079..0df2e01a3fc168c41b83e96815b27a67daf0c7e2 100644
--- a/remoting/host/desktop_environment.h
+++ b/remoting/host/desktop_environment.h
@@ -11,6 +11,7 @@
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
namespace base {
class SingleThreadTaskRunner;
@@ -23,8 +24,9 @@ class ScreenCapturer;
namespace remoting {
class AudioCapturer;
+class ClientSessionControl;
class InputInjector;
-class SessionController;
+class ScreenControls;
// Provides factory methods for creation of audio/video capturers and event
// executor for a given desktop environment.
@@ -33,16 +35,11 @@ class DesktopEnvironment {
virtual ~DesktopEnvironment() {}
// Factory methods used to create audio/video capturers, event executor, and
- // session controller for a particular desktop environment.
- virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
- scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) = 0;
- virtual scoped_ptr<InputInjector> CreateInputInjector(
- scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) = 0;
- virtual scoped_ptr<SessionController> CreateSessionController() = 0;
- virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer(
- scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) = 0;
+ // screen controls object for a particular desktop environment.
+ virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() = 0;
+ virtual scoped_ptr<InputInjector> CreateInputInjector() = 0;
+ virtual scoped_ptr<ScreenControls> CreateScreenControls() = 0;
+ virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() = 0;
};
// Used to create |DesktopEnvironment| instances.
@@ -50,11 +47,10 @@ class DesktopEnvironmentFactory {
public:
virtual ~DesktopEnvironmentFactory() {}
- // Creates an instance of |DesktopEnvironment|. |disconnect_callback| may be
- // used by the DesktopEnvironment to disconnect the client session.
+ // Creates an instance of |DesktopEnvironment|. |client_session_control| must
+ // outlive |this|.
virtual scoped_ptr<DesktopEnvironment> Create(
- const std::string& client_jid,
- const base::Closure& disconnect_callback) = 0;
+ base::WeakPtr<ClientSessionControl> client_session_control) = 0;
// Returns |true| if created |DesktopEnvironment| instances support audio
// capture.
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698