DesktopNativeCursorManager currently only has
knowledge of a single RootWindow, which means
that it is possible for a change in cursor state
within one RootWindow to cause another RootWindow
to have a stale cursor state. This CL makes changes
in cursor state global among all root windows
by doing the following:
- Make CursorManager and DesktopNativeCursorManager
static members of DesktopNativeWidgetAura.
- Maintain a set of root windows in
DesktopNativeCursorManager.
- When a native widget is initialized, add its
owned root window to this set. When a native
widget is destroyed, remove its owned root window
from this set.
- Whenever a call to the public CursorClient API
causes a change in cursor state, inform all root
windows in this set.
This change makes cursor management for desktop
Aura behave similar to cursor management in Ash,
where all root windows are already notified of
cursor state changes.
BUG=324006
TEST=DesktopNativeWidgetAuraTest.GlobalCursorState
Review URL: https://codereview.chromium.org/111043002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240827 0039d316-1c4b-4281-b951-d872f2087c98
9 files changed