Notify all visible renderers when the visibility of the mouse cursor changes
commita01746e1507b0b2256eebced9c7d892b8712a654
authortdanderson@google.com <tdanderson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 6 May 2013 20:16:00 +0000 (6 20:16 +0000)
committertdanderson@google.com <tdanderson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 6 May 2013 20:16:00 +0000 (6 20:16 +0000)
treebf46dd6b4c4bb54b2bdfc5f4195e17abbc018e3f
parent8136b62262f65e6053cbf2d0ee45a9fc9a43c051
Notify all visible renderers when the visibility of the mouse cursor changes

Blink side patch:
https://codereview.chromium.org/14047016/

The ultimate goal of both patches is to disallow new hover
effects from being invoked in web contents when the mouse
cursor is not visible to the user (i.e., while touch
scrolling). The job of this patch is to communicate the
cursor visibility state to all visible renderers using
the new IPC InputMsg_CursorVisibilityChange whenever the
visibility state changes.

Added the new observer type CursorClientObserver.
Subscribers (instances of RenderWidgetHostViewAura) are
notified whenever the cursor visibility changes, at which
point the IPC is sent to the renderer.

I have also removed the code in ash_native_cursor_manager.cc
that sets the mouse cursor location to the bogus value
of (-10000,-10000) when mouse events are disabled; afaik
this was originally added as a way to prevent unwanted
hover effects in web contents but it does not work in all
cases and causes other problems (see crbug.com/174358).

BUG=153784,174358
R=jamesr@chromium.org, kenrb@chromium.org, oshima@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/14047015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198519 0039d316-1c4b-4281-b951-d872f2087c98
16 files changed:
ash/wm/ash_native_cursor_manager.cc
ash/wm/window_manager_unittest.cc
content/browser/renderer_host/render_widget_host_impl.cc
content/browser/renderer_host/render_widget_host_impl.h
content/browser/renderer_host/render_widget_host_view_aura.cc
content/browser/renderer_host/render_widget_host_view_aura.h
content/common/input_messages.h
content/renderer/render_widget.cc
content/renderer/render_widget.h
ui/aura/aura.gyp
ui/aura/client/cursor_client.h
ui/aura/client/cursor_client_observer.h [new file with mode: 0644]
ui/views/corewm/compound_event_filter_unittest.cc
ui/views/corewm/cursor_manager.cc
ui/views/corewm/cursor_manager.h
ui/views/corewm/cursor_manager_unittest.cc