| 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 "remoting/host/audio_capturer.h" | 7 #include "remoting/host/audio_capturer.h" |
| 8 #include "remoting/host/chromoting_host.h" |
| 8 #include "remoting/host/chromoting_host_context.h" | 9 #include "remoting/host/chromoting_host_context.h" |
| 9 #include "remoting/host/desktop_environment.h" | 10 #include "remoting/host/desktop_environment.h" |
| 10 #include "remoting/host/event_executor.h" | 11 #include "remoting/host/event_executor.h" |
| 11 #include "remoting/host/video_frame_capturer.h" | 12 #include "remoting/host/video_frame_capturer.h" |
| 12 | 13 |
| 13 namespace remoting { | 14 namespace remoting { |
| 14 | 15 |
| 15 DesktopEnvironmentFactory::DesktopEnvironmentFactory( | 16 DesktopEnvironmentFactory::DesktopEnvironmentFactory( |
| 16 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 17 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 17 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) | 18 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) |
| 18 : input_task_runner_(input_task_runner), | 19 : input_task_runner_(input_task_runner), |
| 19 ui_task_runner_(ui_task_runner) { | 20 ui_task_runner_(ui_task_runner) { |
| 20 } | 21 } |
| 21 | 22 |
| 22 DesktopEnvironmentFactory::~DesktopEnvironmentFactory() { | 23 DesktopEnvironmentFactory::~DesktopEnvironmentFactory() { |
| 23 } | 24 } |
| 24 | 25 |
| 25 scoped_ptr<DesktopEnvironment> DesktopEnvironmentFactory::Create() { | 26 scoped_ptr<DesktopEnvironment> DesktopEnvironmentFactory::Create( |
| 27 scoped_refptr<ChromotingHost> host) { |
| 26 scoped_ptr<AudioCapturer> audio_capturer = AudioCapturer::Create(); | 28 scoped_ptr<AudioCapturer> audio_capturer = AudioCapturer::Create(); |
| 27 scoped_ptr<EventExecutor> event_executor = EventExecutor::Create( | 29 scoped_ptr<EventExecutor> event_executor = EventExecutor::Create( |
| 28 input_task_runner_, ui_task_runner_); | 30 input_task_runner_, ui_task_runner_); |
| 29 scoped_ptr<VideoFrameCapturer> video_capturer(VideoFrameCapturer::Create()); | 31 scoped_ptr<VideoFrameCapturer> video_capturer(VideoFrameCapturer::Create()); |
| 30 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment( | 32 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment( |
| 31 audio_capturer.Pass(), event_executor.Pass(), video_capturer.Pass())); | 33 audio_capturer.Pass(), event_executor.Pass(), video_capturer.Pass())); |
| 32 } | 34 } |
| 33 | 35 |
| 34 bool DesktopEnvironmentFactory::SupportsAudioCapture() const { | 36 bool DesktopEnvironmentFactory::SupportsAudioCapture() const { |
| 35 return AudioCapturer::IsSupported(); | 37 return AudioCapturer::IsSupported(); |
| 36 } | 38 } |
| 37 | 39 |
| 38 } // namespace remoting | 40 } // namespace remoting |
| OLD | NEW |