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

Unified Diff: remoting/host/ipc_desktop_environment.h

Issue 11028128: [Chromoting] Request the daemon to open a terminal once a connection has been accepted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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/host_mock_objects.cc ('k') | remoting/host/ipc_desktop_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment.h
diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h
new file mode 100644
index 0000000000000000000000000000000000000000..d27235bcb38c9cbf99c620fab42ce828e18ea8ad
--- /dev/null
+++ b/remoting/host/ipc_desktop_environment.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_
+#define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "remoting/host/desktop_environment.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // base
+
+namespace remoting {
+
+class ClientSession;
+class DesktopSessionConnector;
+
+// A variant of desktop environment integrating with the desktop by means of
+// a helper process and talking to that process via IPC.
+class IpcDesktopEnvironment : public DesktopEnvironment {
+ public:
+ // |desktop_session_connector| is used to bind the IpcDesktopEnvironment to
+ // a desktop session, to be notified with a new IPC channel every time
+ // the desktop process is changed. |desktop_session_connector| must outlive
+ // |this|. |client| specifies the client session owning |this|.
+ IpcDesktopEnvironment(
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+ DesktopSessionConnector* desktop_session_connector,
+ ClientSession* client);
+ virtual ~IpcDesktopEnvironment();
+
+ virtual void Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
+
+ // Disconnects the client session that owns |this|.
+ void DisconnectClient();
+
+ private:
+ DesktopSessionConnector* desktop_session_connector_;
+
+ // Specifies the client session that owns |this|.
+ ClientSession* client_;
+
+ // True if |this| has been connected to a desktop session.
+ bool connected_;
+
+ DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_
« no previous file with comments | « remoting/host/host_mock_objects.cc ('k') | remoting/host/ipc_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698