| 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 <limits> | 7 #include <limits> |
| 8 #include <sddl.h> | 8 #include <sddl.h> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 std::min(kMaxRdpScreenWidth, | 249 std::min(kMaxRdpScreenWidth, |
| 250 std::max(kMinRdpScreenWidth, host_size.width())), | 250 std::max(kMinRdpScreenWidth, host_size.width())), |
| 251 std::min(kMaxRdpScreenHeight, | 251 std::min(kMaxRdpScreenHeight, |
| 252 std::max(kMinRdpScreenHeight, host_size.height()))); | 252 std::max(kMinRdpScreenHeight, host_size.height()))); |
| 253 | 253 |
| 254 // Create an RDP session. | 254 // Create an RDP session. |
| 255 base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler( | 255 base::win::ScopedComPtr<IRdpDesktopSessionEventHandler> event_handler( |
| 256 new EventHandler(weak_factory_.GetWeakPtr())); | 256 new EventHandler(weak_factory_.GetWeakPtr())); |
| 257 terminal_id_ = base::GenerateGUID(); | 257 terminal_id_ = base::GenerateGUID(); |
| 258 base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); | 258 base::win::ScopedBstr terminal_id(base::UTF8ToUTF16(terminal_id_).c_str()); |
| 259 result = rdp_desktop_session_->Connect(host_size.width(), | 259 result = rdp_desktop_session_->Connect(host_size.width(), host_size.height(), |
| 260 host_size.height(), | 260 terminal_id, event_handler.get()); |
| 261 terminal_id, | |
| 262 event_handler); | |
| 263 if (FAILED(result)) { | 261 if (FAILED(result)) { |
| 264 LOG(ERROR) << "RdpSession::Create() failed, 0x" | 262 LOG(ERROR) << "RdpSession::Create() failed, 0x" |
| 265 << std::hex << result << std::dec << "."; | 263 << std::hex << result << std::dec << "."; |
| 266 return false; | 264 return false; |
| 267 } | 265 } |
| 268 | 266 |
| 269 return true; | 267 return true; |
| 270 } | 268 } |
| 271 | 269 |
| 272 void RdpSession::OnRdpConnected() { | 270 void RdpSession::OnRdpConnected() { |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 exploded.hour, | 599 exploded.hour, |
| 602 exploded.minute, | 600 exploded.minute, |
| 603 exploded.second, | 601 exploded.second, |
| 604 exploded.millisecond, | 602 exploded.millisecond, |
| 605 passed.c_str()); | 603 passed.c_str()); |
| 606 | 604 |
| 607 last_timestamp_ = now; | 605 last_timestamp_ = now; |
| 608 } | 606 } |
| 609 | 607 |
| 610 } // namespace remoting | 608 } // namespace remoting |
| OLD | NEW |