diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 21:06:24 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 21:06:24 +0000 |
commit | 60ccc243dfbfc86001cf1c0a4b44131a39d7d28d (patch) | |
tree | 8834337b7ad8eec985fd783d382734c5d9388eed /remoting/host/desktop_session.h | |
parent | f05d582b7e213b15138697c01abf48c652ff271a (diff) | |
download | chromium_src-60ccc243dfbfc86001cf1c0a4b44131a39d7d28d.zip chromium_src-60ccc243dfbfc86001cf1c0a4b44131a39d7d28d.tar.gz chromium_src-60ccc243dfbfc86001cf1c0a4b44131a39d7d28d.tar.bz2 |
[Chromoting] Added support of a list of desktop sessions on the daemon side.
DaemonProcess object keeps a list of active desktop sessions, each representing the screen, input devices, etc to be remoted to another machine. The network process is expected to request a desktop session to be opened once a connection has been accepted and closed when the client session is destroyed. This CL includes changes on the daemon side only.
BUG=134694
Review URL: https://chromiumcodereview.appspot.com/11017065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/desktop_session.h')
-rw-r--r-- | remoting/host/desktop_session.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/remoting/host/desktop_session.h b/remoting/host/desktop_session.h new file mode 100644 index 0000000..f59818b --- /dev/null +++ b/remoting/host/desktop_session.h @@ -0,0 +1,42 @@ +// 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_DESKTOP_SESSION_H_ +#define REMOTING_HOST_DESKTOP_SESSION_H_ + +#include "base/basictypes.h" +#include "base/compiler_specific.h" + +namespace remoting { + +class DaemonProcess; + +// Represents the desktop session for a connected terminal. Each desktop session +// has a unique identifier used by cross-platform code to refer to it. +class DesktopSession { + public: + virtual ~DesktopSession(); + + int id() const { return id_; } + + protected: + // Creates a terminal and assigns a unique identifier to it. |deamon_process| + // must outlive |this|. + DesktopSession(DaemonProcess* daemon_process, int id); + + DaemonProcess* daemon_process() const { return daemon_process_; } + + private: + // The owner of |this|. + DaemonProcess* const daemon_process_; + + // A unique identifier of the terminal. + const int id_; + + DISALLOW_COPY_AND_ASSIGN(DesktopSession); +}; + +} // namespace remoting + +#endif // REMOTING_HOST_DESKTOP_SESSION_H_ |