Lines Matching defs:desktop
11 #include "webrtc/modules/desktop_capture/win/desktop.h"
19 Desktop::Desktop(HDESK desktop, bool own) : desktop_(desktop), own_(own) {
22 Desktop::~Desktop() {
25 LOG(LS_ERROR) << "Failed to close the owned desktop handle: "
31 bool Desktop::GetName(std::wstring* desktop_name_out) const {
44 LOG(LS_ERROR) << "Failed to query the desktop name: " << GetLastError();
52 bool Desktop::IsSame(const Desktop& other) const {
64 bool Desktop::SetThreadDesktop() const {
66 LOG(LS_ERROR) << "Failed to assign the desktop to the current thread: "
74 Desktop* Desktop::GetDesktop(const WCHAR* desktop_name) {
79 HDESK desktop = OpenDesktop(desktop_name, 0, FALSE, desired_access);
80 if (desktop == NULL) {
81 LOG(LS_ERROR) << "Failed to open the desktop '" << desktop_name << "': "
86 return new Desktop(desktop, true);
89 Desktop* Desktop::GetInputDesktop() {
90 HDESK desktop = OpenInputDesktop(
92 if (desktop == NULL)
95 return new Desktop(desktop, true);
98 Desktop* Desktop::GetThreadDesktop() {
99 HDESK desktop = ::GetThreadDesktop(GetCurrentThreadId());
100 if (desktop == NULL) {
101 LOG(LS_ERROR) << "Failed to retrieve the handle of the desktop assigned to "
107 return new Desktop(desktop, false);