| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "remoting/host/win/session_desktop_environment_factory.h" | |
| 6 | |
| 7 #include "base/single_thread_task_runner.h" | |
| 8 #include "remoting/capturer/video_frame_capturer.h" | |
| 9 #include "remoting/host/audio_capturer.h" | |
| 10 #include "remoting/host/chromoting_host_context.h" | |
| 11 #include "remoting/host/desktop_environment.h" | |
| 12 #include "remoting/host/event_executor.h" | |
| 13 #include "remoting/host/win/session_event_executor.h" | |
| 14 | |
| 15 namespace remoting { | |
| 16 | |
| 17 SessionDesktopEnvironmentFactory::SessionDesktopEnvironmentFactory( | |
| 18 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | |
| 19 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | |
| 20 const base::Closure& inject_sas) | |
| 21 : DesktopEnvironmentFactory(input_task_runner, ui_task_runner), | |
| 22 inject_sas_(inject_sas) { | |
| 23 } | |
| 24 | |
| 25 SessionDesktopEnvironmentFactory::~SessionDesktopEnvironmentFactory() { | |
| 26 } | |
| 27 | |
| 28 scoped_ptr<DesktopEnvironment> SessionDesktopEnvironmentFactory::Create() { | |
| 29 scoped_ptr<AudioCapturer> audio_capturer = AudioCapturer::Create(); | |
| 30 scoped_ptr<EventExecutor> event_executor = EventExecutor::Create( | |
| 31 input_task_runner_, ui_task_runner_); | |
| 32 event_executor.reset(new SessionEventExecutorWin( | |
| 33 input_task_runner_, event_executor.Pass(), ui_task_runner_, inject_sas_)); | |
| 34 scoped_ptr<VideoFrameCapturer> video_capturer(VideoFrameCapturer::Create()); | |
| 35 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment( | |
| 36 audio_capturer.Pass(), | |
| 37 event_executor.Pass(), | |
| 38 video_capturer.Pass())); | |
| 39 } | |
| 40 | |
| 41 } // namespace remoting | |
| OLD | NEW |