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

Unified Diff: remoting/host/desktop_process.cc

Issue 11413022: DesktopSessionAgent now hosts the video capturer and provides necessary plumbing to drive it via an… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing clang compilation. Created 8 years, 1 month 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_session_agent.h » ('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 7f3d7301b2e97c93d1d55bba8d861163d2523f8f..6fcb4ff7e5893b3837924d54ee7d8810c8fb522b 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -18,8 +18,6 @@
#include "remoting/host/chromoting_messages.h"
#include "remoting/host/desktop_session_agent.h"
-const char kIoThreadName[] = "I/O thread";
-
namespace remoting {
DesktopProcess::DesktopProcess(
@@ -60,7 +58,8 @@ void DesktopProcess::OnChannelError() {
// Shutdown the desktop process.
daemon_channel_.reset();
- desktop_agent_.reset();
+ desktop_agent_->Stop();
+ desktop_agent_ = NULL;
caller_task_runner_ = NULL;
}
@@ -69,12 +68,17 @@ bool DesktopProcess::Start() {
// Launch the I/O thread.
scoped_refptr<AutoThreadTaskRunner> io_task_runner =
- AutoThread::CreateWithType(kIoThreadName, caller_task_runner_,
+ AutoThread::CreateWithType("I/O thread", caller_task_runner_,
MessageLoop::TYPE_IO);
+ // Launch the video capture thread.
+ scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner =
+ AutoThread::Create("Video capture thread", caller_task_runner_);
+
// Create a desktop agent.
desktop_agent_ = DesktopSessionAgent::Create(caller_task_runner_,
- io_task_runner);
+ io_task_runner,
+ video_capture_task_runner);
// Start the agent and create an IPC channel to talk to it. It is safe to
// use base::Unretained(this) here because the message loop below will run
@@ -83,7 +87,8 @@ bool DesktopProcess::Start() {
if (!desktop_agent_->Start(base::Bind(&DesktopProcess::OnChannelError,
base::Unretained(this)),
&desktop_pipe)) {
- desktop_agent_.reset();
+ desktop_agent_ = NULL;
+ caller_task_runner_ = NULL;
return false;
}
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_session_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698