Chromium Code Reviews| Index: remoting/host/desktop_environment.h |
| diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h |
| index 8b32a89fb58b473073e15916fb56651ba24909a6..b4101febeefb4f43b4e690c3e76f4cb3e1f3c041 100644 |
| --- a/remoting/host/desktop_environment.h |
| +++ b/remoting/host/desktop_environment.h |
| @@ -5,8 +5,6 @@ |
| #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
| #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
| -#include <string> |
| - |
| #include "base/basictypes.h" |
| #include "base/memory/scoped_ptr.h" |
| @@ -23,47 +21,29 @@ class ClipboardStub; |
| class DesktopEnvironment { |
| public: |
| - // Creates a DesktopEnvironment used in a host plugin. |
| - static scoped_ptr<DesktopEnvironment> Create( |
| - ChromotingHostContext* context); |
| - |
| - // Creates a DesktopEnvironment used in a service process. |
| - static scoped_ptr<DesktopEnvironment> CreateForService( |
| - ChromotingHostContext* context); |
| - |
| - static scoped_ptr<DesktopEnvironment> CreateFake( |
| - ChromotingHostContext* context, |
| - scoped_ptr<VideoFrameCapturer> capturer, |
| - scoped_ptr<EventExecutor> event_executor, |
| - scoped_ptr<AudioCapturer> audio_capturer); |
| - |
| + DesktopEnvironment(scoped_ptr<AudioCapturer> audio_capturer, |
| + scoped_ptr<EventExecutor> event_executor, |
| + scoped_ptr<VideoFrameCapturer> video_capturer); |
| virtual ~DesktopEnvironment(); |
| - VideoFrameCapturer* capturer() const { return capturer_.get(); } |
| - EventExecutor* event_executor() const { return event_executor_.get(); } |
| AudioCapturer* audio_capturer() const { return audio_capturer_.get(); } |
| - void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard); |
| - void OnSessionFinished(); |
| - |
| - private: |
| - DesktopEnvironment(ChromotingHostContext* context, |
| - scoped_ptr<VideoFrameCapturer> capturer, |
| - scoped_ptr<EventExecutor> event_executor, |
| - scoped_ptr<AudioCapturer> audio_capturer); |
| - |
| - // Host context used to make sure operations are run on the correct thread. |
| - // This is owned by the ChromotingHost. |
| - ChromotingHostContext* context_; |
| + EventExecutor* event_executor() const { return event_executor_.get(); } |
| + VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); } |
| - // Used to capture video to deliver to clients. |
| - scoped_ptr<VideoFrameCapturer> capturer_; |
| + virtual void Start( |
| + scoped_ptr<protocol::ClipboardStub> client_clipboard); |
| + virtual void StopAndDelete(); |
|
Wez
2012/08/31 18:18:02
We don't actually need StopAndDelete() here, since
alexeypa (please no reviews)
2012/08/31 23:13:30
There is no real reason to keep it here at the mom
|
| + private: |
| // Used to capture audio to deliver to clients. |
| scoped_ptr<AudioCapturer> audio_capturer_; |
| // Executes input and clipboard events received from the client. |
| scoped_ptr<EventExecutor> event_executor_; |
| + // Used to capture video to deliver to clients. |
| + scoped_ptr<VideoFrameCapturer> video_capturer_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); |
| }; |