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

Unified Diff: remoting/host/desktop_process_main.cc

Issue 12087073: Pass a DesktopEnvironmentFactory when creating DesktopProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not create the audio capturer if audio is not supported 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
Index: remoting/host/desktop_process_main.cc
diff --git a/remoting/host/desktop_process_main.cc b/remoting/host/desktop_process_main.cc
index be7f918bf795716f7ddcefdb5b64a99bfb5d7d23..5c6b8468df85a8108a3c58f2348471dc48187149 100644
--- a/remoting/host/desktop_process_main.cc
+++ b/remoting/host/desktop_process_main.cc
@@ -20,10 +20,12 @@
#include "base/win/windows_version.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/base/breakpad.h"
+#include "remoting/host/basic_desktop_environment.h"
#include "remoting/host/desktop_process.h"
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/logging.h"
#include "remoting/host/usage_stats_consent.h"
+#include "remoting/host/win/session_desktop_environment.h"
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -129,7 +131,17 @@ int DesktopProcessMain(int argc, char** argv) {
quit_ui_task_runner);
DesktopProcess desktop_process(ui_task_runner, channel_name);
- if (!desktop_process.Start())
+
+ // Create proper kind of desktop environment factory.
Wez 2013/02/01 01:02:11 nit: "... proper kind of ..." -> "... platform-dep
alexeypa (please no reviews) 2013/02/01 17:28:43 Done.
+ scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory;
+#if defined(OS_WIN)
+ desktop_environment_factory.reset(new SessionDesktopEnvironmentFactory(
+ base::Bind(&DesktopProcess::InjectSas, desktop_process.AsWeakPtr())));
+#else // !defined(OS_WIN)
+ desktop_environment_factory.reset(new BasicDesktopEnvironmentFactory());
+#endif // !defined(OS_WIN)
+
+ if (!desktop_process.Start(desktop_environment_factory.Pass()))
return kInitializationFailed;
// Run the UI message loop.

Powered by Google App Engine
This is Rietveld 408576698