Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed)

Created:
8 years ago by mazda
Modified:
8 years ago
Reviewers:
oshima, sky
CC:
chromium-reviews, tfarina, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Make the cursor have separate mode for disabled mouse events and invisible. This CL adds the following APIs. * CursorClient::DisableMouseEvents: Makes mouse events stop being sent and hides the cursor if it is visible. (For now, DisableMouseEvents just clears the hover state and doesn't prevent mouse events from being generated, though). * CursorClient::EnableMouseEvents: Makes mouse events start being sent and shows the cursor if it was hidden with DisableMouseEvents. * CursorClient::HideCursor: Makes the cursor invisible. This changes only the cursor visibility and mouse events keep being sent even when the cursor is invisible. * CursorClient::ShowCursor: Makes the cursor visible. This does not take effect When mouse events are disabled. This CL just replaces the old usages of CursorClient::ShowCursor with the new APIs to retain existing behavior. I'll make another CL that uses these APIs in appropriate places. BUG=153703 TEST=CursorManagerTest.EnableDisableMouseEvents, CursorManagerTest.ShowAndEnable Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173933

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 14

Patch Set 5 : address comments #

Total comments: 6

Patch Set 6 : address comments #

Total comments: 2

Patch Set 7 : fix compile errors and nit #

Total comments: 6

Patch Set 8 : rebase #

Total comments: 2

Patch Set 9 : Change the CursorClient interface #

Patch Set 10 : #

Patch Set 11 : Change DisableMouseEvents to hide cursor #

Patch Set 12 : #

Patch Set 13 : fix CompoundEventFilterTest.TouchHidesCursor #

Patch Set 14 : fix win_aura #

Unified diffs Side-by-side diffs Delta from patch set Stats (+557 lines, -217 lines) Patch
M ash/display/mouse_cursor_event_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -6 lines 0 comments Download
M ash/magnifier/magnification_controller.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ash/test/ash_test_base.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ash/test/cursor_manager_test_api.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M ash/test/cursor_manager_test_api.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M ash/tooltips/tooltip_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M ash/wm/cursor_manager.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +21 lines, -19 lines 0 comments Download
M ash/wm/cursor_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +141 lines, -41 lines 0 comments Download
M ash/wm/cursor_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +222 lines, -9 lines 0 comments Download
M ash/wm/session_state_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/session_state_controller_impl2.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -3 lines 0 comments Download
M ash/wm/window_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -3 lines 0 comments Download
M ui/aura/client/cursor_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -7 lines 0 comments Download
M ui/aura/env.h View 1 2 3 4 5 2 chunks +3 lines, -9 lines 0 comments Download
M ui/aura/env.cc View 1 2 3 4 5 3 chunks +0 lines, -24 lines 0 comments Download
M ui/aura/root_window.h View 1 2 3 4 5 6 7 8 11 2 chunks +4 lines, -1 line 0 comments Download
M ui/aura/root_window.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +21 lines, -12 lines 0 comments Download
M ui/aura/root_window_host.h View 1 2 3 4 5 6 7 8 11 1 chunk +2 lines, -1 line 0 comments Download
M ui/aura/root_window_host_linux.cc View 1 2 3 4 5 6 7 8 9 11 1 chunk +7 lines, -0 lines 0 comments Download
M ui/aura/root_window_host_win.cc View 1 2 3 4 5 6 7 8 11 2 chunks +8 lines, -0 lines 0 comments Download
M ui/aura/root_window_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -41 lines 0 comments Download
M ui/aura/window_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -2 lines 0 comments Download
M ui/views/corewm/compound_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/corewm/compound_event_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +29 lines, -12 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_cursor_client.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -1 line 0 comments Download
M ui/views/widget/desktop_aura/desktop_cursor_client.cc View 1 2 3 4 5 6 7 8 11 2 chunks +30 lines, -9 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc View 1 2 3 4 5 6 7 8 11 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
mazda
Could you review this CL?
8 years ago (2012-12-04 23:42:45 UTC) #1
oshima
Took just a quick glance. I'll take more closer look a bit later. https://codereview.chromium.org/11412315/diff/2008/ash/test/cursor_manager_test_api.h File ...
8 years ago (2012-12-05 23:46:45 UTC) #2
mazda
Thank you for the review. Please take another look. https://codereview.chromium.org/11412315/diff/2008/ash/test/cursor_manager_test_api.h File ash/test/cursor_manager_test_api.h (right): https://codereview.chromium.org/11412315/diff/2008/ash/test/cursor_manager_test_api.h#newcode25 ash/test/cursor_manager_test_api.h:25: ...
8 years ago (2012-12-06 01:36:49 UTC) #3
mazda
Thank you for the review. Please take another look. https://codereview.chromium.org/11412315/diff/2008/ash/test/cursor_manager_test_api.h File ash/test/cursor_manager_test_api.h (right): https://codereview.chromium.org/11412315/diff/2008/ash/test/cursor_manager_test_api.h#newcode25 ash/test/cursor_manager_test_api.h:25: ...
8 years ago (2012-12-06 01:36:50 UTC) #4
oshima
https://codereview.chromium.org/11412315/diff/25002/ash/wm/cursor_manager.cc File ash/wm/cursor_manager.cc (right): https://codereview.chromium.org/11412315/diff/25002/ash/wm/cursor_manager.cc#newcode146 ash/wm/cursor_manager.cc:146: ShowCursorInternal(state_on_unlock_->visible()); It'd be better to have "current_state_", and "state_on_unlock_", ...
8 years ago (2012-12-06 18:55:46 UTC) #5
mazda
Thank you for the review. Please take another look. https://codereview.chromium.org/11412315/diff/25002/ash/wm/cursor_manager.cc File ash/wm/cursor_manager.cc (right): https://codereview.chromium.org/11412315/diff/25002/ash/wm/cursor_manager.cc#newcode146 ash/wm/cursor_manager.cc:146: ...
8 years ago (2012-12-07 20:50:51 UTC) #6
oshima
lgtm with nits please update the description as disabling doesn't prevent mouse events from being ...
8 years ago (2012-12-08 00:08:19 UTC) #7
mazda
> please update the description as disabling doesn't > prevent mouse events from being generated. ...
8 years ago (2012-12-08 00:19:26 UTC) #8
mazda
+sky Could you do an OWNERS review for ui/views, ash, and ui/aura?
8 years ago (2012-12-08 01:24:21 UTC) #9
sky
When do we need to disable the cursor?
8 years ago (2012-12-10 15:10:28 UTC) #10
mazda
On 2012/12/10 15:10:28, sky wrote: > When do we need to disable the cursor? One ...
8 years ago (2012-12-10 17:59:14 UTC) #11
sky
I get the distinction between the two, but I'm still confused as to when we ...
8 years ago (2012-12-10 22:11:20 UTC) #12
mazda
>I get the distinction between the two, but I'm still confused > as to when ...
8 years ago (2012-12-14 21:16:43 UTC) #13
sky
https://codereview.chromium.org/11412315/diff/45001/ui/aura/client/cursor_client.h File ui/aura/client/cursor_client.h (right): https://codereview.chromium.org/11412315/diff/45001/ui/aura/client/cursor_client.h#newcode30 ui/aura/client/cursor_client.h:30: virtual void EnableCursor(bool enabled) = 0; This class has ...
8 years ago (2012-12-17 16:35:38 UTC) #14
mazda
Thank you for the review. Please take another look. https://codereview.chromium.org/11412315/diff/45001/ui/aura/client/cursor_client.h File ui/aura/client/cursor_client.h (right): https://codereview.chromium.org/11412315/diff/45001/ui/aura/client/cursor_client.h#newcode30 ui/aura/client/cursor_client.h:30: ...
8 years ago (2012-12-18 02:49:32 UTC) #15
sky
On Mon, Dec 17, 2012 at 6:49 PM, <mazda@chromium.org> wrote: > Thank you for the ...
8 years ago (2012-12-18 15:50:06 UTC) #16
mazda
> Sorry if my question was misleading. I actually prefer having an implicit > hide, ...
8 years ago (2012-12-18 22:52:29 UTC) #17
sky
LGTM
8 years ago (2012-12-18 23:40:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mazda@chromium.org/11412315/78003
8 years ago (2012-12-19 01:20:43 UTC) #19
commit-bot: I haz the power
Failed to trigger a try job on win_aura HTTP Error 400: Bad Request
8 years ago (2012-12-19 05:36:49 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mazda@chromium.org/11412315/71004
8 years ago (2012-12-19 05:36:55 UTC) #21
commit-bot: I haz the power
Retried try job too often on win_aura for step(s) browser_tests
8 years ago (2012-12-19 16:12:22 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mazda@chromium.org/11412315/71004
8 years ago (2012-12-19 16:43:26 UTC) #23
commit-bot: I haz the power
8 years ago (2012-12-19 16:43:55 UTC) #24
Message was sent while issue was closed.
Change committed as 173933

Powered by Google App Engine
This is Rietveld 408576698