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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // to be called if mstsc::controlCloseWaitForEvents was returned. | 233 // to be called if mstsc::controlCloseWaitForEvents was returned. |
234 } | 234 } |
235 | 235 |
236 LRESULT RdpClientWindow::OnCreate(CREATESTRUCT* create_struct) { | 236 LRESULT RdpClientWindow::OnCreate(CREATESTRUCT* create_struct) { |
237 CAxWindow2 activex_window; | 237 CAxWindow2 activex_window; |
238 base::win::ScopedComPtr<IUnknown> control; | 238 base::win::ScopedComPtr<IUnknown> control; |
239 HRESULT result = E_FAIL; | 239 HRESULT result = E_FAIL; |
240 base::win::ScopedComPtr<mstsc::IMsTscSecuredSettings> secured_settings; | 240 base::win::ScopedComPtr<mstsc::IMsTscSecuredSettings> secured_settings; |
241 base::win::ScopedComPtr<mstsc::IMsRdpClientSecuredSettings> secured_settings2; | 241 base::win::ScopedComPtr<mstsc::IMsRdpClientSecuredSettings> secured_settings2; |
242 base::win::ScopedBstr server_name( | 242 base::win::ScopedBstr server_name( |
243 UTF8ToUTF16(server_endpoint_.ToStringWithoutPort()).c_str()); | 243 base::UTF8ToUTF16(server_endpoint_.ToStringWithoutPort()).c_str()); |
244 base::win::ScopedBstr terminal_id(UTF8ToUTF16(terminal_id_).c_str()); | 244 base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); |
245 | 245 |
246 // Create the child window that actually hosts the ActiveX control. | 246 // Create the child window that actually hosts the ActiveX control. |
247 RECT rect = { 0, 0, screen_size_.width(), screen_size_.height() }; | 247 RECT rect = { 0, 0, screen_size_.width(), screen_size_.height() }; |
248 activex_window.Create(m_hWnd, rect, NULL, WS_CHILD | WS_VISIBLE | WS_BORDER); | 248 activex_window.Create(m_hWnd, rect, NULL, WS_CHILD | WS_VISIBLE | WS_BORDER); |
249 if (activex_window.m_hWnd == NULL) { | 249 if (activex_window.m_hWnd == NULL) { |
250 result = HRESULT_FROM_WIN32(GetLastError()); | 250 result = HRESULT_FROM_WIN32(GetLastError()); |
251 goto done; | 251 goto done; |
252 } | 252 } |
253 | 253 |
254 // Instantiate the RDP ActiveX control. | 254 // Instantiate the RDP ActiveX control. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 return CallNextHookEx(hook, code, wparam, lparam); | 520 return CallNextHookEx(hook, code, wparam, lparam); |
521 | 521 |
522 // Close the window once all pending window messages are processed. | 522 // Close the window once all pending window messages are processed. |
523 HWND window = reinterpret_cast<HWND>(wparam); | 523 HWND window = reinterpret_cast<HWND>(wparam); |
524 LOG(WARNING) << "RDP: closing a window: " << std::hex << window << std::dec; | 524 LOG(WARNING) << "RDP: closing a window: " << std::hex << window << std::dec; |
525 ::PostMessage(window, WM_CLOSE, 0, 0); | 525 ::PostMessage(window, WM_CLOSE, 0, 0); |
526 return 0; | 526 return 0; |
527 } | 527 } |
528 | 528 |
529 } // namespace remoting | 529 } // namespace remoting |
OLD | NEW |