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

Unified Diff: remoting/host/desktop_environment.h

Issue 9617027: Chromoting: Implemented security attention sequence (SAS) emulation on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 8 years, 9 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
Index: remoting/host/desktop_environment.h
diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h
index f95089bd90a971a40cf97433c5cabdb658da541a..611227f79a979c0113d29b55f08c47322b5cea01 100644
--- a/remoting/host/desktop_environment.h
+++ b/remoting/host/desktop_environment.h
@@ -11,8 +11,16 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
+#include "ipc/ipc_channel.h"
#include "remoting/base/scoped_thread_proxy.h"
+namespace IPC {
+
+class ChannelProxy;
+class Message;
+
+} // namespace IPC
+
namespace remoting {
class Capturer;
@@ -20,22 +28,35 @@ class ChromotingHost;
class ChromotingHostContext;
class EventExecutor;
-class DesktopEnvironment {
+class DesktopEnvironment : public IPC::Channel::Listener {
public:
- static DesktopEnvironment* Create(ChromotingHostContext* context);
+ // Creates DesktopEnvironment along with the capturer and event executor.
+ // |context| is assumed to be owned by the ChromotingHost.
+ static scoped_ptr<DesktopEnvironment> Create(ChromotingHostContext* context);
+
+ // Creates DesktopEnvironment using the passed |capturer| and |event_executor|
+ // taking their ownership. |context| is assumed to be owned by
+ // the ChromotingHost.
+ static scoped_ptr<DesktopEnvironment> CreateFake(
+ ChromotingHostContext* context,
+ Capturer* capturer,
+ EventExecutor* event_executor);
- // DesktopEnvironment takes ownership of all the objects passed in.
- DesktopEnvironment(ChromotingHostContext* context,
- Capturer* capturer,
- EventExecutor* event_executor);
virtual ~DesktopEnvironment();
+ // IPC::Channel::Listener implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
void set_host(ChromotingHost* host) { host_ = host; }
Capturer* capturer() const { return capturer_.get(); }
EventExecutor* event_executor() const { return event_executor_.get(); }
private:
+ DesktopEnvironment(ChromotingHostContext* context);
+
+ bool Initialize();
+
// The host that owns this DesktopEnvironment.
ChromotingHost* host_;
@@ -43,6 +64,9 @@ class DesktopEnvironment {
// This is owned by the ChromotingHost.
ChromotingHostContext* context_;
+ // IPC channel connecting the host with the chromoting service.
+ scoped_ptr<IPC::ChannelProxy> chromoting_session_;
+
// Capturer to be used by ScreenRecorder.
scoped_ptr<Capturer> capturer_;

Powered by Google App Engine
This is Rietveld 408576698