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

Unified Diff: remoting/host/desktop_process.cc

Issue 12087073: Pass a DesktopEnvironmentFactory when creating DesktopProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased. fixed posix. Created 7 years, 11 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 67eb7dde0c3ceb9b35ee21b3216ed9566b05be3e..2785a29688604b59f12c3db4fdfa1630da06586f 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -16,6 +16,7 @@
#include "remoting/base/auto_thread.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/host/chromoting_messages.h"
+#include "remoting/host/desktop_environment.h"
#include "remoting/host/desktop_session_agent.h"
namespace remoting {
@@ -34,6 +35,12 @@ DesktopProcess::~DesktopProcess() {
DCHECK(!desktop_agent_);
}
+DesktopEnvironmentFactory& DesktopProcess::desktop_environment_factory() {
+ DCHECK(caller_task_runner_->BelongsToCurrentThread());
+
+ return *desktop_environment_factory_;
+}
+
void DesktopProcess::OnNetworkProcessDisconnected() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
@@ -73,8 +80,13 @@ void DesktopProcess::OnChannelError() {
caller_task_runner_ = NULL;
}
-bool DesktopProcess::Start() {
+bool DesktopProcess::Start(
+ scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
+ DCHECK(!desktop_environment_factory_);
+ DCHECK(desktop_environment_factory);
+
+ desktop_environment_factory_ = desktop_environment_factory.Pass();
// Launch the audio capturing thread.
scoped_refptr<AutoThreadTaskRunner> audio_task_runner;
« 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