1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_H_ 6 #define REMOTING_HOST_DESKTOP_SESSION_H_ 7 8 #include "base/basictypes.h" 9 #include "base/compiler_specific.h" 10 11 namespace remoting { 12 13 class DaemonProcess; 14 class ScreenResolution; 15 16 // Represents the desktop session for a connected terminal. Each desktop session 17 // has a unique identifier used by cross-platform code to refer to it. 18 class DesktopSession { 19 public: 20 virtual ~DesktopSession(); 21 22 // Changes the screen resolution of the desktop session. 23 virtual void SetScreenResolution(const ScreenResolution& resolution) = 0; 24 25 int id() const { return id_; } 26 27 protected: 28 // Creates a terminal and assigns a unique identifier to it. |daemon_process| 29 // must outlive |this|. 30 DesktopSession(DaemonProcess* daemon_process, int id); 31 32 DaemonProcess* daemon_process() const { return daemon_process_; } 33 34 private: 35 // The owner of |this|. 36 DaemonProcess* const daemon_process_; 37 38 // A unique identifier of the terminal. 39 const int id_; 40 41 DISALLOW_COPY_AND_ASSIGN(DesktopSession); 42 }; 43 44 } // namespace remoting 45 46 #endif // REMOTING_HOST_DESKTOP_SESSION_H_ 47