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.h" | 5 #include "remoting/host/win/rdp_client.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <iphlpapi.h> | 8 #include <iphlpapi.h> |
9 #include <winsock2.h> | 9 #include <winsock2.h> |
10 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 get_extended_tcp_table_(NULL) { | 133 get_extended_tcp_table_(NULL) { |
134 } | 134 } |
135 | 135 |
136 void RdpClient::Core::Connect(const SkISize& screen_size) { | 136 void RdpClient::Core::Connect(const SkISize& screen_size) { |
137 if (!ui_task_runner_->BelongsToCurrentThread()) { | 137 if (!ui_task_runner_->BelongsToCurrentThread()) { |
138 ui_task_runner_->PostTask(FROM_HERE, | 138 ui_task_runner_->PostTask(FROM_HERE, |
139 base::Bind(&Core::Connect, this, screen_size)); | 139 base::Bind(&Core::Connect, this, screen_size)); |
140 return; | 140 return; |
141 } | 141 } |
142 | 142 |
143 DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI); | 143 DCHECK_EQ(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI); |
144 DCHECK(!rdp_client_window_); | 144 DCHECK(!rdp_client_window_); |
145 DCHECK(!self_); | 145 DCHECK(!self_); |
146 | 146 |
147 // This code link statically agains iphlpapi.dll, so it must be loaded | 147 // This code link statically agains iphlpapi.dll, so it must be loaded |
148 // already. | 148 // already. |
149 HMODULE iphlpapi_handle = GetModuleHandle(L"iphlpapi.dll"); | 149 HMODULE iphlpapi_handle = GetModuleHandle(L"iphlpapi.dll"); |
150 CHECK(iphlpapi_handle != NULL); | 150 CHECK(iphlpapi_handle != NULL); |
151 | 151 |
152 // Get a pointer to GetExtendedTcpTable() which is available starting from | 152 // Get a pointer to GetExtendedTcpTable() which is available starting from |
153 // XP SP2 / W2K3 SP1. | 153 // XP SP2 / W2K3 SP1. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 383 } |
384 | 384 |
385 if (event_handler_) { | 385 if (event_handler_) { |
386 RdpClient::EventHandler* event_handler = event_handler_; | 386 RdpClient::EventHandler* event_handler = event_handler_; |
387 event_handler_ = NULL; | 387 event_handler_ = NULL; |
388 event_handler->OnRdpClosed(); | 388 event_handler->OnRdpClosed(); |
389 } | 389 } |
390 } | 390 } |
391 | 391 |
392 } // namespace remoting | 392 } // namespace remoting |
OLD | NEW |