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

Unified Diff: remoting/host/desktop_environment.cc

Issue 9829006: [chromoting] Fix crash when generating access code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 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_environment.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_environment.cc
diff --git a/remoting/host/desktop_environment.cc b/remoting/host/desktop_environment.cc
index 874a3c8256740e3ca0ae9318408baf62d292ba9e..e3268afa392049e7d19b8bda7ab9469bfafe8556 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(
+ 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(OS_WIN)
event_executor.reset(new SessionEventExecutorWin(
context->desktop_message_loop(),
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698