| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/win/rdp_client_window.h" | 5 #include "remoting/host/win/rdp_client_window.h" |
| 6 | 6 |
| 7 #include <wtsdefs.h> | 7 #include <wtsdefs.h> |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 WTS_PERF_ENABLE_DESKTOP_COMPOSITION; | 332 WTS_PERF_ENABLE_DESKTOP_COMPOSITION; |
| 333 result = client_settings_->put_PerformanceFlags(kDesiredFlags); | 333 result = client_settings_->put_PerformanceFlags(kDesiredFlags); |
| 334 if (FAILED(result)) | 334 if (FAILED(result)) |
| 335 return LogOnCreateError(result); | 335 return LogOnCreateError(result); |
| 336 | 336 |
| 337 // Set the port to connect to. | 337 // Set the port to connect to. |
| 338 result = client_settings_->put_RDPPort(server_endpoint_.port()); | 338 result = client_settings_->put_RDPPort(server_endpoint_.port()); |
| 339 if (FAILED(result)) | 339 if (FAILED(result)) |
| 340 return LogOnCreateError(result); | 340 return LogOnCreateError(result); |
| 341 | 341 |
| 342 // Disable audio in the session. | |
| 343 // TODO(alexeypa): re-enable audio redirection when http://crbug.com/242312 is | |
| 344 // fixed. | |
| 345 result = client_->get_SecuredSettings2(secured_settings2.Receive()); | 342 result = client_->get_SecuredSettings2(secured_settings2.Receive()); |
| 346 if (SUCCEEDED(result)) { | 343 if (SUCCEEDED(result)) { |
| 347 result = secured_settings2->put_AudioRedirectionMode(kRdpAudioModeNone); | 344 result = |
| 345 secured_settings2->put_AudioRedirectionMode(kRdpAudioModeRedirect); |
| 348 if (FAILED(result)) | 346 if (FAILED(result)) |
| 349 return LogOnCreateError(result); | 347 return LogOnCreateError(result); |
| 350 } | 348 } |
| 351 | 349 |
| 352 result = client_->get_SecuredSettings(secured_settings.Receive()); | 350 result = client_->get_SecuredSettings(secured_settings.Receive()); |
| 353 if (FAILED(result)) | 351 if (FAILED(result)) |
| 354 return LogOnCreateError(result); | 352 return LogOnCreateError(result); |
| 355 | 353 |
| 356 // Set the terminal ID as the working directory for the initial program. It is | 354 // Set the terminal ID as the working directory for the initial program. It is |
| 357 // observed that |WorkDir| is used only if an initial program is also | 355 // observed that |WorkDir| is used only if an initial program is also |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 return CallNextHookEx(hook, code, wparam, lparam); | 517 return CallNextHookEx(hook, code, wparam, lparam); |
| 520 | 518 |
| 521 // Close the window once all pending window messages are processed. | 519 // Close the window once all pending window messages are processed. |
| 522 HWND window = reinterpret_cast<HWND>(wparam); | 520 HWND window = reinterpret_cast<HWND>(wparam); |
| 523 LOG(WARNING) << "RDP: closing a window: " << std::hex << window << std::dec; | 521 LOG(WARNING) << "RDP: closing a window: " << std::hex << window << std::dec; |
| 524 ::PostMessage(window, WM_CLOSE, 0, 0); | 522 ::PostMessage(window, WM_CLOSE, 0, 0); |
| 525 return 0; | 523 return 0; |
| 526 } | 524 } |
| 527 | 525 |
| 528 } // namespace remoting | 526 } // namespace remoting |
| OLD | NEW |