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
3 // found in the LICENSE file.
5 #include "remoting/host/win/window_station_and_desktop.h"
11 WindowStationAndDesktop::WindowStationAndDesktop()
13 window_station_(nullptr) {
16 WindowStationAndDesktop::~WindowStationAndDesktop() {
18 SetWindowStation(nullptr);
21 void WindowStationAndDesktop::SetDesktop(HDESK desktop
) {
22 std::swap(desktop_
, desktop
);
24 CloseDesktop(desktop
);
27 void WindowStationAndDesktop::SetWindowStation(HWINSTA window_station
) {
28 std::swap(window_station_
, window_station
);
30 CloseWindowStation(window_station
);
33 void WindowStationAndDesktop::Swap(WindowStationAndDesktop
& other
) {
34 std::swap(desktop_
, other
.desktop_
);
35 std::swap(window_station_
, other
.window_station_
);
38 } // namespace remoting