| 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 #include "remoting/host/desktop_environment_options.h" | 5 #include "remoting/host/desktop_environment_options.h" |
| 6 | 6 |
| 7 #include <string> |
| 7 #include <utility> | 8 #include <utility> |
| 8 | 9 |
| 10 #include "base/optional.h" |
| 11 |
| 9 namespace remoting { | 12 namespace remoting { |
| 10 | 13 |
| 11 using DesktopCaptureOptions = webrtc::DesktopCaptureOptions; | 14 using DesktopCaptureOptions = webrtc::DesktopCaptureOptions; |
| 12 | 15 |
| 13 // static | 16 // static |
| 14 DesktopEnvironmentOptions DesktopEnvironmentOptions::CreateDefault() { | 17 DesktopEnvironmentOptions DesktopEnvironmentOptions::CreateDefault() { |
| 15 DesktopEnvironmentOptions options; | 18 DesktopEnvironmentOptions options; |
| 16 options.desktop_capture_options_ = DesktopCaptureOptions::CreateDefault(); | 19 options.desktop_capture_options_ = DesktopCaptureOptions::CreateDefault(); |
| 17 options.Initialize(); | 20 options.Initialize(); |
| 18 return options; | 21 return options; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 60 } |
| 58 | 61 |
| 59 bool DesktopEnvironmentOptions::enable_user_interface() const { | 62 bool DesktopEnvironmentOptions::enable_user_interface() const { |
| 60 return enable_user_interface_; | 63 return enable_user_interface_; |
| 61 } | 64 } |
| 62 | 65 |
| 63 void DesktopEnvironmentOptions::set_enable_user_interface(bool enabled) { | 66 void DesktopEnvironmentOptions::set_enable_user_interface(bool enabled) { |
| 64 enable_user_interface_ = enabled; | 67 enable_user_interface_ = enabled; |
| 65 } | 68 } |
| 66 | 69 |
| 70 void DesktopEnvironmentOptions::Import(const HostSessionOptions& options) { |
| 71 #if defined(OS_WIN) |
| 72 base::Optional<std::string> result = options.Get("DirectX-Capturer"); |
| 73 if (result) { |
| 74 desktop_capture_options_.set_allow_directx_capturer(*result == "true"); |
| 75 } |
| 76 #endif |
| 77 } |
| 78 |
| 67 } // namespace remoting | 79 } // namespace remoting |
| OLD | NEW |