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

Side by Side Diff: remoting/host/win/window_station_and_desktop.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) 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/win/window_station_and_desktop.h" 5 #include "remoting/host/win/window_station_and_desktop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 namespace remoting { 9 namespace remoting {
10 10
11 WindowStationAndDesktop::WindowStationAndDesktop() 11 WindowStationAndDesktop::WindowStationAndDesktop()
12 : desktop_(NULL), 12 : desktop_(nullptr),
13 window_station_(NULL) { 13 window_station_(nullptr) {
14 } 14 }
15 15
16 WindowStationAndDesktop::~WindowStationAndDesktop() { 16 WindowStationAndDesktop::~WindowStationAndDesktop() {
17 SetDesktop(NULL); 17 SetDesktop(nullptr);
18 SetWindowStation(NULL); 18 SetWindowStation(nullptr);
19 } 19 }
20 20
21 void WindowStationAndDesktop::SetDesktop(HDESK desktop) { 21 void WindowStationAndDesktop::SetDesktop(HDESK desktop) {
22 std::swap(desktop_, desktop); 22 std::swap(desktop_, desktop);
23 if (desktop) 23 if (desktop)
24 CloseDesktop(desktop); 24 CloseDesktop(desktop);
25 } 25 }
26 26
27 void WindowStationAndDesktop::SetWindowStation(HWINSTA window_station) { 27 void WindowStationAndDesktop::SetWindowStation(HWINSTA window_station) {
28 std::swap(window_station_, window_station); 28 std::swap(window_station_, window_station);
29 if (window_station) 29 if (window_station)
30 CloseWindowStation(window_station); 30 CloseWindowStation(window_station);
31 } 31 }
32 32
33 void WindowStationAndDesktop::Swap(WindowStationAndDesktop& other) { 33 void WindowStationAndDesktop::Swap(WindowStationAndDesktop& other) {
34 std::swap(desktop_, other.desktop_); 34 std::swap(desktop_, other.desktop_);
35 std::swap(window_station_, other.window_station_); 35 std::swap(window_station_, other.window_station_);
36 } 36 }
37 37
38 } // namespace remoting 38 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/unprivileged_process_delegate.cc ('k') | remoting/host/win/worker_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698