Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
michael@0 | 2 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 3 | // found in the LICENSE file. |
michael@0 | 4 | |
michael@0 | 5 | #ifndef SANDBOX_SRC_WINDOW_H_ |
michael@0 | 6 | #define SANDBOX_SRC_WINDOW_H_ |
michael@0 | 7 | |
michael@0 | 8 | #include <windows.h> |
michael@0 | 9 | #include <string> |
michael@0 | 10 | |
michael@0 | 11 | #include "sandbox/win/src/sandbox_types.h" |
michael@0 | 12 | |
michael@0 | 13 | namespace sandbox { |
michael@0 | 14 | |
michael@0 | 15 | // Creates a window station. The name is generated by the OS. The security |
michael@0 | 16 | // descriptor is based on the security descriptor of the current window |
michael@0 | 17 | // station. |
michael@0 | 18 | ResultCode CreateAltWindowStation(HWINSTA* winsta); |
michael@0 | 19 | |
michael@0 | 20 | // Creates a desktop. The name is a static string followed by the pid of the |
michael@0 | 21 | // current process. The security descriptor on the new desktop is based on the |
michael@0 | 22 | // security descriptor of the desktop associated with the current thread. |
michael@0 | 23 | // If a winsta is specified, the function will switch to it before creating |
michael@0 | 24 | // the desktop. If the functions fails the switch back to the current winsta, |
michael@0 | 25 | // the function will return SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION. |
michael@0 | 26 | ResultCode CreateAltDesktop(HWINSTA winsta, HDESK* desktop); |
michael@0 | 27 | |
michael@0 | 28 | // Returns the name of a desktop or a window station. |
michael@0 | 29 | std::wstring GetWindowObjectName(HANDLE handle); |
michael@0 | 30 | |
michael@0 | 31 | // Returns the name of the desktop referenced by |desktop|. If a window |
michael@0 | 32 | // station is specified, the name is prepended with the window station name, |
michael@0 | 33 | // followed by a backslash. This name can be used as the lpDesktop parameter |
michael@0 | 34 | // to CreateProcess. |
michael@0 | 35 | std::wstring GetFullDesktopName(HWINSTA winsta, HDESK desktop); |
michael@0 | 36 | |
michael@0 | 37 | } // namespace sandbox |
michael@0 | 38 | |
michael@0 | 39 | #endif // SANDBOX_SRC_WINDOW_H_ |