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

Unified Diff: remoting/host/desktop_process.cc

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/desktop_process.h ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_process.cc
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
index 9e2fc751e723f3af05a657860a0bef1f555f0ef2..c62e85cf0063c0352111d129c4911832ece1681d 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -25,8 +25,10 @@ namespace remoting {
DesktopProcess::DesktopProcess(
scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> input_task_runner,
const std::string& daemon_channel_name)
: caller_task_runner_(caller_task_runner),
+ input_task_runner_(input_task_runner),
daemon_channel_name_(daemon_channel_name) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI);
@@ -83,6 +85,8 @@ void DesktopProcess::OnChannelError() {
}
caller_task_runner_ = NULL;
+ input_task_runner_ = NULL;
+ desktop_environment_factory_.reset();
}
bool DesktopProcess::Start(
@@ -106,11 +110,6 @@ bool DesktopProcess::Start(
"ChromotingAudioThread", caller_task_runner_, MessageLoop::TYPE_IO);
#endif // !defined(OS_WIN)
- // Launch the input thread.
- scoped_refptr<AutoThreadTaskRunner> input_task_runner =
- AutoThread::CreateWithType("Input thread", caller_task_runner_,
- MessageLoop::TYPE_IO);
-
// Launch the I/O thread.
scoped_refptr<AutoThreadTaskRunner> io_task_runner =
AutoThread::CreateWithType("I/O thread", caller_task_runner_,
@@ -123,7 +122,7 @@ bool DesktopProcess::Start(
// Create a desktop agent.
desktop_agent_ = DesktopSessionAgent::Create(audio_task_runner,
caller_task_runner_,
- input_task_runner,
+ input_task_runner_,
io_task_runner,
video_capture_task_runner);
@@ -132,6 +131,8 @@ bool DesktopProcess::Start(
if (!desktop_agent_->Start(AsWeakPtr(), &desktop_pipe)) {
desktop_agent_ = NULL;
caller_task_runner_ = NULL;
+ input_task_runner_ = NULL;
+ desktop_environment_factory_.reset();
return false;
}
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698