| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_OPTIONS_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_OPTIONS_H_ |
| 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_OPTIONS_H_ | 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_OPTIONS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "remoting/host/host_session_options.h" |
| 11 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | 12 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 12 | 13 |
| 13 namespace webrtc { | |
| 14 class DesktopCaptureOptions; | |
| 15 } // namespace webrtc | |
| 16 | |
| 17 namespace remoting { | 14 namespace remoting { |
| 18 | 15 |
| 19 // A container of options a DesktopEnvironment or its derived classes need to | 16 // A container of options a DesktopEnvironment or its derived classes need to |
| 20 // control the behavior. | 17 // control the behavior. |
| 21 class DesktopEnvironmentOptions final { | 18 class DesktopEnvironmentOptions final { |
| 22 public: | 19 public: |
| 23 // Returns instance of DesktopEnvironmentOptions with default parameters, and | 20 // Returns instance of DesktopEnvironmentOptions with default parameters, and |
| 24 // initializes DesktopCaptureOptions by using | 21 // initializes DesktopCaptureOptions by using |
| 25 // DesktopCaptureOptions::CreateDefault(). | 22 // DesktopCaptureOptions::CreateDefault(). |
| 26 static DesktopEnvironmentOptions CreateDefault(); | 23 static DesktopEnvironmentOptions CreateDefault(); |
| 27 | 24 |
| 28 DesktopEnvironmentOptions(); | 25 DesktopEnvironmentOptions(); |
| 29 DesktopEnvironmentOptions(DesktopEnvironmentOptions&& other); | 26 DesktopEnvironmentOptions(DesktopEnvironmentOptions&& other); |
| 30 DesktopEnvironmentOptions(const DesktopEnvironmentOptions& other); | 27 DesktopEnvironmentOptions(const DesktopEnvironmentOptions& other); |
| 31 ~DesktopEnvironmentOptions(); | 28 ~DesktopEnvironmentOptions(); |
| 32 | 29 |
| 33 DesktopEnvironmentOptions& operator=(DesktopEnvironmentOptions&& other); | 30 DesktopEnvironmentOptions& operator=(DesktopEnvironmentOptions&& other); |
| 34 DesktopEnvironmentOptions& operator=(const DesktopEnvironmentOptions& other); | 31 DesktopEnvironmentOptions& operator=(const DesktopEnvironmentOptions& other); |
| 35 | 32 |
| 36 bool enable_curtaining() const; | 33 bool enable_curtaining() const; |
| 37 void set_enable_curtaining(bool enabled); | 34 void set_enable_curtaining(bool enabled); |
| 38 | 35 |
| 39 bool enable_user_interface() const; | 36 bool enable_user_interface() const; |
| 40 void set_enable_user_interface(bool enabled); | 37 void set_enable_user_interface(bool enabled); |
| 41 | 38 |
| 42 const webrtc::DesktopCaptureOptions* desktop_capture_options() const; | 39 const webrtc::DesktopCaptureOptions* desktop_capture_options() const; |
| 43 webrtc::DesktopCaptureOptions* desktop_capture_options(); | 40 webrtc::DesktopCaptureOptions* desktop_capture_options(); |
| 44 | 41 |
| 42 // Reads configurations from a HostSessionOptions instance. |
| 43 void ApplyHostSessionOptions(const HostSessionOptions& options); |
| 44 |
| 45 private: | 45 private: |
| 46 // Sets default values for default constructor and CreateDefault() function. | 46 // Sets default values for default constructor and CreateDefault() function. |
| 47 void Initialize(); | 47 void Initialize(); |
| 48 | 48 |
| 49 // True if the curtain mode should be enabled by the DesktopEnvironment | 49 // True if the curtain mode should be enabled by the DesktopEnvironment |
| 50 // instances. Note, not all DesktopEnvironments support curtain mode. | 50 // instances. Note, not all DesktopEnvironments support curtain mode. |
| 51 bool enable_curtaining_ = false; | 51 bool enable_curtaining_ = false; |
| 52 | 52 |
| 53 // True if a user-interactive window is showing up in it2me scenario. | 53 // True if a user-interactive window is showing up in it2me scenario. |
| 54 bool enable_user_interface_ = true; | 54 bool enable_user_interface_ = true; |
| 55 | 55 |
| 56 // The DesktopCaptureOptions to initialize DesktopCapturer. | 56 // The DesktopCaptureOptions to initialize DesktopCapturer. |
| 57 webrtc::DesktopCaptureOptions desktop_capture_options_; | 57 webrtc::DesktopCaptureOptions desktop_capture_options_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace remoting | 60 } // namespace remoting |
| 61 | 61 |
| 62 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_OPTIONS_H_ | 62 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_OPTIONS_H_ |
| OLD | NEW |