| Index: remoting/host/chromoting_host.cc
|
| diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
|
| index dc509fe11bd07c3488aae18a99c5e85648af464b..b3cc0c326c366b066c66d00ffe77a1a375fb5a08 100644
|
| --- a/remoting/host/chromoting_host.cc
|
| +++ b/remoting/host/chromoting_host.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "build/build_config.h"
|
| #include "jingle/glue/thread_wrapper.h"
|
| +#include "remoting/base/auto_thread_task_runner.h"
|
| #include "remoting/base/constants.h"
|
| #include "remoting/base/logging.h"
|
| #include "remoting/host/chromoting_host_context.h"
|
| @@ -67,13 +68,11 @@ ChromotingHost::ChromotingHost(
|
| DesktopEnvironmentFactory* desktop_environment_factory,
|
| std::unique_ptr<protocol::SessionManager> session_manager,
|
| scoped_refptr<protocol::TransportContext> transport_context,
|
| - scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
|
| - scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner)
|
| + const ChromotingHostContext& context)
|
| : desktop_environment_factory_(desktop_environment_factory),
|
| session_manager_(std::move(session_manager)),
|
| transport_context_(transport_context),
|
| - audio_task_runner_(audio_task_runner),
|
| - video_encode_task_runner_(video_encode_task_runner),
|
| + context_(context.Copy()),
|
| started_(false),
|
| login_backoff_(&kDefaultBackoffPolicy),
|
| enable_curtaining_(false),
|
| @@ -268,16 +267,16 @@ void ChromotingHost::OnIncomingSession(
|
| protocol::SessionConfig::Protocol::WEBRTC) {
|
| connection.reset(new protocol::WebrtcConnectionToClient(
|
| base::WrapUnique(session), transport_context_,
|
| - video_encode_task_runner_));
|
| + context_->video_encode_task_runner()));
|
| } else {
|
| connection.reset(new protocol::IceConnectionToClient(
|
| base::WrapUnique(session), transport_context_,
|
| - video_encode_task_runner_));
|
| + context_->video_encode_task_runner()));
|
| }
|
|
|
| // Create a ClientSession object.
|
| ClientSession* client =
|
| - new ClientSession(this, audio_task_runner_, std::move(connection),
|
| + new ClientSession(*context_, this, std::move(connection),
|
| desktop_environment_factory_, max_session_duration_,
|
| pairing_registry_, extensions_.get());
|
|
|
|
|