Index: remoting/host/desktop_environment_factory.h |
diff --git a/remoting/host/desktop_environment_factory.h b/remoting/host/desktop_environment_factory.h |
index 3a25437af19fc194327838d8dd6dc3d1d562996d..016c26e2bb9016e6334598289acbcbff423e08d8 100644 |
--- a/remoting/host/desktop_environment_factory.h |
+++ b/remoting/host/desktop_environment_factory.h |
@@ -5,7 +5,10 @@ |
#ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_FACTORY_H_ |
#define REMOTING_HOST_DESKTOP_ENVIRONMENT_FACTORY_H_ |
+#include <string> |
+ |
#include "base/basictypes.h" |
+#include "base/callback_forward.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
@@ -19,21 +22,29 @@ class DesktopEnvironment; |
class DesktopEnvironmentFactory { |
public: |
- DesktopEnvironmentFactory( |
- scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
+ explicit DesktopEnvironmentFactory( |
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner); |
virtual ~DesktopEnvironmentFactory(); |
- // Creates an instance of |DesktopEnvironment|. |
- virtual scoped_ptr<DesktopEnvironment> Create(); |
+ // Creates an instance of |DesktopEnvironment|. |disconnect_callback| is |
+ // cached by the created DesktopEnvironment and can be invoked later to |
Wez
2013/01/11 02:23:41
nit: Suggest "|disconnect_callback| may be used by
alexeypa (please no reviews)
2013/01/11 19:59:46
Done.
|
+ // disconnect the client session. |
+ virtual scoped_ptr<DesktopEnvironment> Create( |
+ const std::string& client_jid, |
+ const base::Closure& disconnect_callback); |
// Returns |true| if created |DesktopEnvironment| instances support audio |
// capture. |
virtual bool SupportsAudioCapture() const; |
protected: |
- scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; |
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() { |
+ return caller_task_runner_; |
+ } |
+ |
+ private: |
+ // Task runner on which public methods of this class should be called. |
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; |
DISALLOW_COPY_AND_ASSIGN(DesktopEnvironmentFactory); |
}; |