Index: remoting/host/desktop_environment.cc |
diff --git a/remoting/host/desktop_environment.cc b/remoting/host/desktop_environment.cc |
index 75e784b8b3b7d5d6217372e861d9121eb172da93..3c5f5624db2f1304f454840efe9a4722e17895c3 100644 |
--- a/remoting/host/desktop_environment.cc |
+++ b/remoting/host/desktop_environment.cc |
@@ -30,6 +30,25 @@ scoped_ptr<DesktopEnvironment> DesktopEnvironment::Create( |
return scoped_ptr<DesktopEnvironment>(); |
} |
+ return scoped_ptr<DesktopEnvironment>( |
+ new DesktopEnvironment(context, |
+ capturer.Pass(), |
+ event_executor.Pass())); |
+} |
+ |
+// static |
+scoped_ptr<DesktopEnvironment> DesktopEnvironment::CreateForService( |
alexeypa (please no reviews)
2012/03/21 23:39:12
Oh, well. I guess it is better to have two copies
|
+ ChromotingHostContext* context) { |
+ scoped_ptr<Capturer> capturer(Capturer::Create()); |
+ scoped_ptr<protocol::HostEventStub> event_executor = |
+ EventExecutor::Create(context->desktop_message_loop(), |
+ capturer.get()); |
+ |
+ if (capturer.get() == NULL || event_executor.get() == NULL) { |
+ LOG(ERROR) << "Unable to create DesktopEnvironment"; |
+ return scoped_ptr<DesktopEnvironment>(); |
+ } |
+ |
#if defined(USE_CHROMOTING_IPC) |
event_executor.reset(new SessionEventExecutorWin( |
context->desktop_message_loop(), |