Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: remoting/host/desktop_environment.h

Issue 10915206: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_environment.h
diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h
index 8b32a89fb58b473073e15916fb56651ba24909a6..a653c78e062c6b0b71a322d97d546ca71a418801 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,28 @@ 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);
+ 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);
};
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698