Chromium Code Reviews| 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.h" | 5 #include "remoting/host/desktop_environment.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "remoting/host/audio_capturer.h" | 8 #include "remoting/host/audio_capturer.h" |
| 9 #include "remoting/host/desktop_environment.h" | 9 #include "remoting/host/desktop_environment.h" |
| 10 #include "remoting/host/event_executor.h" | 10 #include "remoting/host/event_executor.h" |
| 11 #include "remoting/host/video_frame_capturer.h" | 11 #include "remoting/host/video_frame_capturer.h" |
| 12 | 12 |
| 13 namespace remoting { | 13 namespace remoting { |
| 14 | 14 |
| 15 DesktopEnvironment::DesktopEnvironment( | 15 DesktopEnvironment::DesktopEnvironment( |
| 16 scoped_ptr<AudioCapturer> audio_capturer, | |
| 17 scoped_ptr<EventExecutor> event_executor, | 16 scoped_ptr<EventExecutor> event_executor, |
| 18 scoped_ptr<VideoFrameCapturer> video_capturer) | 17 scoped_ptr<VideoFrameCapturer> video_capturer) |
| 19 : audio_capturer_(audio_capturer.Pass()), | 18 : event_executor_(event_executor.Pass()), |
| 20 event_executor_(event_executor.Pass()), | |
| 21 video_capturer_(video_capturer.Pass()) { | 19 video_capturer_(video_capturer.Pass()) { |
| 22 } | 20 } |
| 23 | 21 |
| 24 DesktopEnvironment::~DesktopEnvironment() { | 22 DesktopEnvironment::~DesktopEnvironment() { |
| 25 event_executor_.release()->StopAndDelete(); | 23 event_executor_.release()->StopAndDelete(); |
| 26 } | 24 } |
| 27 | 25 |
| 28 void DesktopEnvironment::Start( | 26 void DesktopEnvironment::Start( |
| 29 scoped_ptr<protocol::ClipboardStub> client_clipboard) { | 27 scoped_ptr<protocol::ClipboardStub> client_clipboard) { |
| 30 event_executor_->Start(client_clipboard.Pass()); | 28 event_executor_->Start(client_clipboard.Pass()); |
| 31 } | 29 } |
| 32 | 30 |
| 31 scoped_ptr<AudioCapturer> DesktopEnvironment::CreateAudioCapturer() { | |
|
Wez
2012/10/27 03:43:15
We could remove the requirement for DesktopEnviron
Sergey Ulanov
2012/10/29 23:43:04
Not sure if it's a good idea - it would only make
Wez
2012/10/30 03:43:04
You wouldn't need to ref-count DesktopEnvironment
Sergey Ulanov
2012/10/30 18:47:25
Right, but DesktopEnvironment would still need to
| |
| 32 return AudioCapturer::Create(); | |
| 33 } | |
| 34 | |
| 33 } // namespace remoting | 35 } // namespace remoting |
| OLD | NEW |