Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: remoting/host/win/rdp_client.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void RdpClient::Core::Disconnect() { 161 void RdpClient::Core::Disconnect() {
162 if (!ui_task_runner_->BelongsToCurrentThread()) { 162 if (!ui_task_runner_->BelongsToCurrentThread()) {
163 ui_task_runner_->PostTask(FROM_HERE, base::Bind(&Core::Disconnect, this)); 163 ui_task_runner_->PostTask(FROM_HERE, base::Bind(&Core::Disconnect, this));
164 return; 164 return;
165 } 165 }
166 166
167 // The caller does not expect any notifications to be delivered after this 167 // The caller does not expect any notifications to be delivered after this
168 // point. 168 // point.
169 event_handler_ = NULL; 169 event_handler_ = nullptr;
170 170
171 // Gracefully shutdown the RDP connection. 171 // Gracefully shutdown the RDP connection.
172 if (rdp_client_window_) { 172 if (rdp_client_window_) {
173 self_ = this; 173 self_ = this;
174 rdp_client_window_->Disconnect(); 174 rdp_client_window_->Disconnect();
175 } 175 }
176 } 176 }
177 177
178 void RdpClient::Core::InjectSas() { 178 void RdpClient::Core::InjectSas() {
179 if (!ui_task_runner_->BelongsToCurrentThread()) { 179 if (!ui_task_runner_->BelongsToCurrentThread()) {
(...skipping 13 matching lines...) Expand all
193 } 193 }
194 194
195 void RdpClient::Core::OnDisconnected() { 195 void RdpClient::Core::OnDisconnected() {
196 DCHECK(ui_task_runner_->BelongsToCurrentThread()); 196 DCHECK(ui_task_runner_->BelongsToCurrentThread());
197 DCHECK(rdp_client_window_); 197 DCHECK(rdp_client_window_);
198 198
199 NotifyClosed(); 199 NotifyClosed();
200 200
201 // Delay window destruction until no ActiveX control's code is on the stack. 201 // Delay window destruction until no ActiveX control's code is on the stack.
202 ui_task_runner_->DeleteSoon(FROM_HERE, rdp_client_window_.release()); 202 ui_task_runner_->DeleteSoon(FROM_HERE, rdp_client_window_.release());
203 self_ = NULL; 203 self_ = nullptr;
204 } 204 }
205 205
206 RdpClient::Core::~Core() { 206 RdpClient::Core::~Core() {
207 DCHECK(!event_handler_); 207 DCHECK(!event_handler_);
208 DCHECK(!rdp_client_window_); 208 DCHECK(!rdp_client_window_);
209 } 209 }
210 210
211 void RdpClient::Core::NotifyConnected() { 211 void RdpClient::Core::NotifyConnected() {
212 if (!caller_task_runner_->BelongsToCurrentThread()) { 212 if (!caller_task_runner_->BelongsToCurrentThread()) {
213 caller_task_runner_->PostTask( 213 caller_task_runner_->PostTask(
214 FROM_HERE, base::Bind(&Core::NotifyConnected, this)); 214 FROM_HERE, base::Bind(&Core::NotifyConnected, this));
215 return; 215 return;
216 } 216 }
217 217
218 if (event_handler_) 218 if (event_handler_)
219 event_handler_->OnRdpConnected(); 219 event_handler_->OnRdpConnected();
220 } 220 }
221 221
222 void RdpClient::Core::NotifyClosed() { 222 void RdpClient::Core::NotifyClosed() {
223 if (!caller_task_runner_->BelongsToCurrentThread()) { 223 if (!caller_task_runner_->BelongsToCurrentThread()) {
224 caller_task_runner_->PostTask( 224 caller_task_runner_->PostTask(
225 FROM_HERE, base::Bind(&Core::NotifyClosed, this)); 225 FROM_HERE, base::Bind(&Core::NotifyClosed, this));
226 return; 226 return;
227 } 227 }
228 228
229 if (event_handler_) { 229 if (event_handler_) {
230 RdpClient::EventHandler* event_handler = event_handler_; 230 RdpClient::EventHandler* event_handler = event_handler_;
231 event_handler_ = NULL; 231 event_handler_ = nullptr;
232 event_handler->OnRdpClosed(); 232 event_handler->OnRdpClosed();
233 } 233 }
234 } 234 }
235 235
236 } // namespace remoting 236 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/launch_process_with_token.cc ('k') | remoting/host/win/rdp_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698