| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_session_win.h" | 5 #include "remoting/host/desktop_session_win.h" |
| 6 | 6 |
| 7 #include <sddl.h> | 7 #include <sddl.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 301 } |
| 302 | 302 |
| 303 // Create an RDP session. | 303 // Create an RDP session. |
| 304 base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler( | 304 base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler( |
| 305 new EventHandler(weak_factory_.GetWeakPtr())); | 305 new EventHandler(weak_factory_.GetWeakPtr())); |
| 306 terminal_id_ = base::GenerateGUID(); | 306 terminal_id_ = base::GenerateGUID(); |
| 307 base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); | 307 base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); |
| 308 result = rdp_desktop_session_->Connect(host_size.width(), host_size.height(), | 308 result = rdp_desktop_session_->Connect(host_size.width(), host_size.height(), |
| 309 kDefaultRdpDpi, kDefaultRdpDpi, | 309 kDefaultRdpDpi, kDefaultRdpDpi, |
| 310 terminal_id, server_port, | 310 terminal_id, server_port, |
| 311 event_handler.get()); | 311 event_handler.Get()); |
| 312 if (FAILED(result)) { | 312 if (FAILED(result)) { |
| 313 LOG(ERROR) << "RdpSession::Create() failed, 0x" | 313 LOG(ERROR) << "RdpSession::Create() failed, 0x" |
| 314 << std::hex << result << std::dec << "."; | 314 << std::hex << result << std::dec << "."; |
| 315 return false; | 315 return false; |
| 316 } | 316 } |
| 317 | 317 |
| 318 return true; | 318 return true; |
| 319 } | 319 } |
| 320 | 320 |
| 321 void RdpSession::OnRdpConnected() { | 321 void RdpSession::OnRdpConnected() { |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 exploded.hour, | 698 exploded.hour, |
| 699 exploded.minute, | 699 exploded.minute, |
| 700 exploded.second, | 700 exploded.second, |
| 701 exploded.millisecond, | 701 exploded.millisecond, |
| 702 passed.c_str()); | 702 passed.c_str()); |
| 703 | 703 |
| 704 last_timestamp_ = now; | 704 last_timestamp_ = now; |
| 705 } | 705 } |
| 706 | 706 |
| 707 } // namespace remoting | 707 } // namespace remoting |
| OLD | NEW |