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

Unified Diff: remoting/host/chromoting_host.h

Issue 11018004: Fix ChromotingHost and DesktopEnvironmentFactory references to TaskRunners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build. Created 8 years, 2 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 | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index 4742f94fd993b3df86185f45448f896d47a877f6..0a7b739d75359765eb8d6f73bef723c5a1b523a9 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/memory/scoped_ptr.h"
+#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/threading/thread.h"
#include "net/base/backoff_entry.h"
@@ -22,6 +23,10 @@
#include "remoting/protocol/connection_to_client.h"
#include "third_party/skia/include/core/SkSize.h"
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
namespace remoting {
namespace protocol {
@@ -30,7 +35,6 @@ class SessionConfig;
class CandidateSessionConfig;
} // namespace protocol
-class ChromotingHostContext;
class DesktopEnvironmentFactory;
// A class to implement the functionality of a host process.
@@ -61,13 +65,16 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
public protocol::SessionManager::Listener,
public MouseMoveObserver {
public:
- // The caller must ensure that |context|, |signal_strategy| and
- // |environment| out-live the host.
+ // The caller must ensure that |signal_strategy| and
+ // |desktop_environment_factory| remain valid at least until the
+ // |shutdown_task| supplied to Shutdown() has been notified.
ChromotingHost(
- ChromotingHostContext* context,
SignalStrategy* signal_strategy,
DesktopEnvironmentFactory* desktop_environment_factory,
- scoped_ptr<protocol::SessionManager> session_manager);
+ scoped_ptr<protocol::SessionManager> session_manager,
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> network_task_runner);
// Asynchronously start the host process.
//
@@ -171,9 +178,11 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
// used on the network thread only.
// Parameters specified when the host was created.
- ChromotingHostContext* context_;
DesktopEnvironmentFactory* desktop_environment_factory_;
scoped_ptr<protocol::SessionManager> session_manager_;
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
// Connection objects.
SignalStrategy* signal_strategy_;
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698