// 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_ME2ME_DESKTOP_ENVIRONMENT_H_ #define REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_ #include "base/macros.h" #include "remoting/host/basic_desktop_environment.h" namespace remoting { class CurtainMode; class HostWindow; class LocalInputMonitor; // Same as BasicDesktopEnvironment but supports desktop resizing and X DAMAGE // notifications on Linux. class Me2MeDesktopEnvironment : public BasicDesktopEnvironment { public: ~Me2MeDesktopEnvironment() override; // DesktopEnvironment interface. scoped_ptr CreateScreenControls() override; std::string GetCapabilities() const override; protected: friend class Me2MeDesktopEnvironmentFactory; Me2MeDesktopEnvironment( scoped_refptr caller_task_runner, scoped_refptr video_capture_task_runner, scoped_refptr input_task_runner, scoped_refptr ui_task_runner, bool supports_touch_events); // Initializes security features of the desktop environment (the curtain mode // and in-session UI). bool InitializeSecurity( base::WeakPtr client_session_control, bool curtain_enabled); private: // "Curtains" the session making sure it is disconnected from the local // console. scoped_ptr curtain_; // Presents the disconnect window to the local user. scoped_ptr disconnect_window_; // Notifies the client session about the local mouse movements. scoped_ptr local_input_monitor_; DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironment); }; // Used to create |Me2MeDesktopEnvironment| instances. class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { public: Me2MeDesktopEnvironmentFactory( scoped_refptr caller_task_runner, scoped_refptr video_capture_task_runner, scoped_refptr input_task_runner, scoped_refptr ui_task_runner); ~Me2MeDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory interface. scoped_ptr Create( base::WeakPtr client_session_control) override; void SetEnableCurtaining(bool enable) override; protected: bool curtain_enabled() const { return curtain_enabled_; } private: // True if curtain mode is enabled. bool curtain_enabled_ = false; DISALLOW_COPY_AND_ASSIGN(Me2MeDesktopEnvironmentFactory); }; } // namespace remoting #endif // REMOTING_HOST_ME2ME_DESKTOP_ENVIRONMENT_H_