Index: remoting/host/win/session_desktop_environment_factory.cc |
diff --git a/remoting/host/win/session_desktop_environment_factory.cc b/remoting/host/win/session_desktop_environment_factory.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bf6d0460b8887bb38af6454b4965744c3f115d95 |
--- /dev/null |
+++ b/remoting/host/win/session_desktop_environment_factory.cc |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "remoting/host/win/session_desktop_environment_factory.h" |
+ |
+#include "remoting/host/audio_capturer.h" |
+#include "remoting/host/chromoting_host_context.h" |
+#include "remoting/host/desktop_environment.h" |
+#include "remoting/host/event_executor.h" |
+#include "remoting/host/video_frame_capturer.h" |
+ |
+#if defined(OS_WIN) |
+#include "remoting/host/win/session_event_executor.h" |
+#endif // defined(OS_WIN) |
+ |
+namespace remoting { |
+ |
+SessionDesktopEnvironmentFactory::SessionDesktopEnvironmentFactory() { |
+} |
+ |
+SessionDesktopEnvironmentFactory::~SessionDesktopEnvironmentFactory() { |
+} |
+ |
+scoped_ptr<DesktopEnvironment> SessionDesktopEnvironmentFactory::Create( |
+ ChromotingHostContext* context) { |
+#if defined(OS_WIN) |
Wez
2012/08/31 18:18:02
This only gets build on Windows, so I don't think
alexeypa (please no reviews)
2012/08/31 23:13:30
Done.
|
+ scoped_ptr<AudioCapturer> audio_capturer = AudioCapturer::Create(); |
+ scoped_ptr<EventExecutor> event_executor = EventExecutor::Create( |
+ context->desktop_task_runner(), |
+ context->ui_task_runner()); |
+ event_executor.reset(new SessionEventExecutorWin( |
+ context->desktop_task_runner(), |
+ event_executor.Pass())); |
+ scoped_ptr<VideoFrameCapturer> video_capturer(VideoFrameCapturer::Create()); |
+ return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment( |
+ audio_capturer.Pass(), |
+ event_executor.Pass(), |
+ video_capturer.Pass())); |
simonmorris
2012/09/04 18:47:21
This duplicates code, and it's confusing to have c
alexeypa (please no reviews)
2012/09/05 22:53:29
It is Windows-only code. #if defined(OS_WIN) shoul
Wez
2012/09/06 00:13:22
Chaining should work for the IPC stubs depending o
|
+#else // !defined(OS_WIN) |
+ return DesktopEnvironmentFactory::Create(context); |
+#endif // !defined(OS_WIN) |
+} |
+ |
+} // namespace remoting |