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 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
| 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 | 10 |
| 11 namespace remoting { | 11 namespace remoting { |
| 12 | 12 |
| 13 class AudioCapturer; | 13 class AudioCapturer; |
| 14 class EventExecutor; | 14 class EventExecutor; |
| 15 class VideoFrameCapturer; | 15 class VideoFrameCapturer; |
| 16 | 16 |
| 17 namespace protocol { | 17 namespace protocol { |
| 18 class ClipboardStub; | 18 class ClipboardStub; |
| 19 } | 19 } // namespace protocol |
| 20 | 20 |
| 21 class DesktopEnvironment { | 21 class DesktopEnvironment { |
| 22 public: | 22 public: |
| 23 DesktopEnvironment(scoped_ptr<AudioCapturer> audio_capturer, | 23 DesktopEnvironment(scoped_ptr<EventExecutor> event_executor, |
| 24 scoped_ptr<EventExecutor> event_executor, | |
| 25 scoped_ptr<VideoFrameCapturer> video_capturer); | 24 scoped_ptr<VideoFrameCapturer> video_capturer); |
| 26 virtual ~DesktopEnvironment(); | 25 virtual ~DesktopEnvironment(); |
| 27 | 26 |
| 28 AudioCapturer* audio_capturer() const { return audio_capturer_.get(); } | |
| 29 EventExecutor* event_executor() const { return event_executor_.get(); } | 27 EventExecutor* event_executor() const { return event_executor_.get(); } |
| 28 | |
| 29 // TODO(sergeyu): Replace this with a method that creates a new VideoCapturer. | |
| 30 VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); } | 30 VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); } |
| 31 | 31 |
| 32 virtual void Start( | 32 virtual void Start( |
| 33 scoped_ptr<protocol::ClipboardStub> client_clipboard); | 33 scoped_ptr<protocol::ClipboardStub> client_clipboard); |
| 34 | 34 |
| 35 scoped_ptr<AudioCapturer> CreateAudioCapturer(); | |
|
Wez
2012/10/27 03:43:15
nit: We should make this interface pure virtual an
Sergey Ulanov
2012/10/29 23:43:04
I think it's better to do it in a separate CL.
| |
| 36 | |
| 35 private: | 37 private: |
| 36 // Used to capture audio to deliver to clients. | |
| 37 scoped_ptr<AudioCapturer> audio_capturer_; | |
| 38 | |
| 39 // Executes input and clipboard events received from the client. | 38 // Executes input and clipboard events received from the client. |
| 40 scoped_ptr<EventExecutor> event_executor_; | 39 scoped_ptr<EventExecutor> event_executor_; |
| 41 | 40 |
| 42 // Used to capture video to deliver to clients. | 41 // Used to capture video to deliver to clients. |
| 43 scoped_ptr<VideoFrameCapturer> video_capturer_; | 42 scoped_ptr<VideoFrameCapturer> video_capturer_; |
| 44 | 43 |
| 45 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); | 44 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 } // namespace remoting | 47 } // namespace remoting |
| 49 | 48 |
| 50 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 49 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
| OLD | NEW |