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

Unified Diff: remoting/host/simple_host_process.cc

Issue 11018004: Fix ChromotingHost and DesktopEnvironmentFactory references to TaskRunners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: remoting/host/simple_host_process.cc
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index bef14475000c9dfbab067144cac401611c79ec6f..6caacacb0b9a0a1631e934a802675c76a3885005 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -42,6 +42,7 @@
#include "remoting/host/desktop_environment_factory.h"
#include "remoting/host/dns_blackhole_checker.h"
#include "remoting/host/event_executor.h"
+#include "remoting/host/event_executor_fake.h"
#include "remoting/host/heartbeat_sender.h"
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/host_key_pair.h"
@@ -101,27 +102,24 @@ class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
FakeDesktopEnvironmentFactory();
virtual ~FakeDesktopEnvironmentFactory();
- virtual scoped_ptr<DesktopEnvironment> Create(
- ChromotingHostContext* context) OVERRIDE;
+ virtual scoped_ptr<DesktopEnvironment> Create() OVERRIDE;
+ private:
DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory);
};
-FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {
+ FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory()
+ : DesktopEnvironmentFactory(NULL, NULL) {
}
FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {
}
-scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create(
- ChromotingHostContext* context) {
+scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create() {
scoped_ptr<VideoFrameCapturer> capturer(new VideoFrameCapturerFake());
- scoped_ptr<EventExecutor> event_executor = EventExecutor::Create(
- context->desktop_task_runner(),
- context->ui_task_runner());
- scoped_ptr<AudioCapturer> audio_capturer(NULL);
+ scoped_ptr<EventExecutor> event_executor(new EventExecutorFake());
return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment(
- audio_capturer.Pass(),
+ scoped_ptr<AudioCapturer>(NULL),
event_executor.Pass(),
capturer.Pass()));
}
@@ -263,13 +261,17 @@ class SimpleHost : public HeartbeatSender::Listener {
if (fake_) {
desktop_environment_factory_.reset(new FakeDesktopEnvironmentFactory());
} else {
- desktop_environment_factory_.reset(new DesktopEnvironmentFactory());
+ desktop_environment_factory_.reset(new DesktopEnvironmentFactory(
+ context_.input_task_runner(), context_.ui_task_runner()));
}
host_ = new ChromotingHost(
- &context_, signal_strategy_.get(), desktop_environment_factory_.get(),
+ signal_strategy_.get(), desktop_environment_factory_.get(),
CreateHostSessionManager(network_settings_,
- context_.url_request_context_getter()));
+ context_.url_request_context_getter()),
+ context_.capture_task_runner(),
+ context_.encode_task_runner(),
+ context_.network_task_runner());
ServerLogEntry::Mode mode =
is_it2me_ ? ServerLogEntry::IT2ME : ServerLogEntry::ME2ME;

Powered by Google App Engine
This is Rietveld 408576698