Implementing desktop switching functionality, showing & hiding windows of other users, allowing to override
This CL implements a new class which keeps track of user owned windows, showing and hiding them as the physical user switches between these logical user desktops.
The new class offers the following features:
- It has a global singleton which will instantiate the object upon first use (when multi user is activated).
- It automatically detects..
* started V2 applications and marks them according to user.
* started browsers and marks them according to user (this also works with tab dragging and so).
* Closure of windows and destroys stored owner information.
- It allows to override the temporary target desktop.
- It remembers the show state and restores it accordingly when switched to the active's user's desktop.
- It uses the normal show/hide functionality of windows for the simplest way to make this possible.
- It will detect "incorrect" show / hide invocations and deny them.
Note:
- If dialogs (which are not parented and do not contain browser content) are presented, they will show on all desktops regardless (which is possibly fine? Well - we'll see.)
- Some panels might not be covered yet. These need either be caught by other observers - or by calling chrome::MultiUserWindowManager::GetInstance()->SetWindowOwner(..).
- Transferring of windows from one desktop to another can be done by calling chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser(..)
BUG=303339
TEST=unittest, visual
Review URL: https://codereview.chromium.org/
26086002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227785 0039d316-1c4b-4281-b951-d872f2087c98