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