| 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 <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/optional.h" | 10 #include "base/optional.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return enable_user_interface_; | 67 return enable_user_interface_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 void DesktopEnvironmentOptions::set_enable_user_interface(bool enabled) { | 70 void DesktopEnvironmentOptions::set_enable_user_interface(bool enabled) { |
| 71 enable_user_interface_ = enabled; | 71 enable_user_interface_ = enabled; |
| 72 } | 72 } |
| 73 | 73 |
| 74 void DesktopEnvironmentOptions::ApplyHostSessionOptions( | 74 void DesktopEnvironmentOptions::ApplyHostSessionOptions( |
| 75 const HostSessionOptions& options) { | 75 const HostSessionOptions& options) { |
| 76 #if defined(OS_WIN) | 76 #if defined(OS_WIN) |
| 77 base::Optional<std::string> directx_capturer = | 77 base::Optional<bool> directx_capturer = |
| 78 options.Get("DirectX-Capturer"); | 78 options.GetBool("DirectX-Capturer"); |
| 79 if (directx_capturer) { | 79 if (directx_capturer) { |
| 80 desktop_capture_options_.set_allow_directx_capturer( | 80 desktop_capture_options_.set_allow_directx_capturer(*directx_capturer); |
| 81 *directx_capturer == "true"); | |
| 82 } | 81 } |
| 83 #endif | 82 #endif |
| 84 // This field is for test purpose. Usually it should not be set to false. | 83 // This field is for test purpose. Usually it should not be set to false. |
| 85 base::Optional<std::string> detect_updated_region = | 84 base::Optional<bool> detect_updated_region = |
| 86 options.Get("Detect-Updated-Region"); | 85 options.GetBool("Detect-Updated-Region"); |
| 87 if (detect_updated_region) { | 86 if (detect_updated_region) { |
| 88 desktop_capture_options_.set_detect_updated_region( | 87 desktop_capture_options_.set_detect_updated_region(*detect_updated_region); |
| 89 *detect_updated_region == "true"); | |
| 90 } | 88 } |
| 91 } | 89 } |
| 92 | 90 |
| 93 } // namespace remoting | 91 } // namespace remoting |
| OLD | NEW |