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

Unified Diff: remoting/host/desktop_environment.h

Issue 10909143: Revert 155574 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to Cl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- remoting/host/desktop_environment.h (revision 155615)
+++ remoting/host/desktop_environment.h (working copy)
@@ -5,6 +5,8 @@
#ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
#define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
+#include <string>
+
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
@@ -21,28 +23,47 @@
class DesktopEnvironment {
public:
- DesktopEnvironment(scoped_ptr<AudioCapturer> audio_capturer,
- scoped_ptr<EventExecutor> event_executor,
- scoped_ptr<VideoFrameCapturer> video_capturer);
+ // 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);
+
virtual ~DesktopEnvironment();
+ VideoFrameCapturer* capturer() const { return capturer_.get(); }
+ EventExecutor* event_executor() const { return event_executor_.get(); }
AudioCapturer* audio_capturer() const { return audio_capturer_.get(); }
- EventExecutor* event_executor() const { return event_executor_.get(); }
- VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); }
+ void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard);
+ void OnSessionFinished();
- virtual void Start(
- scoped_ptr<protocol::ClipboardStub> client_clipboard);
+ private:
+ DesktopEnvironment(ChromotingHostContext* context,
+ scoped_ptr<VideoFrameCapturer> capturer,
+ scoped_ptr<EventExecutor> event_executor,
+ scoped_ptr<AudioCapturer> audio_capturer);
- private:
+ // Host context used to make sure operations are run on the correct thread.
+ // This is owned by the ChromotingHost.
+ ChromotingHostContext* context_;
+
+ // Used to capture video to deliver to clients.
+ scoped_ptr<VideoFrameCapturer> capturer_;
+
// 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