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

Issue 1465803003: mus: Let clients set the cursor of their window. (Closed)

Created:
5 years, 1 month ago by Elliot Glaysher
Modified:
5 years ago
Reviewers:
sky
CC:
chromium-reviews, rjkroege, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, tfarina, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mus: Let clients set the cursor of their window. This adds a cursor property for each window. mus changes the cursor as the pointer passes between windows. BUG=548428 Committed: https://crrev.com/314e9981a45aa20338d87c1952977603b051c725 Cr-Commit-Position: refs/heads/master@{#363261}

Patch Set 1 #

Patch Set 2 : Don't spam pipes; maybe fix android compile. #

Patch Set 3 : Rebase on Monday. #

Patch Set 4 : Add a single unit test to make sure we get notifications of windows changing their cursors. #

Patch Set 5 : One more test + commented out 2nd. #

Patch Set 6 : Rebase to ToT #

Patch Set 7 : Remove TODO. #

Patch Set 8 : Sync pass the nacl breakage #

Total comments: 15

Patch Set 9 : sky comments. #

Patch Set 10 : Merge with ToT to pick up sky's EnableHitTest change. #

Patch Set 11 : Fix WindowTreeAppTest.SetCursor. #

Total comments: 11

Patch Set 12 : Test draging outside the window with WindowTreeTest.DragOutsideWindow. #

Patch Set 13 : Merge with ToT to resolve merge conflicts. #

Patch Set 14 : Fix Windows #

Patch Set 15 : 3rd merge conflict today. #

Total comments: 2

Patch Set 16 : Move code. #

Total comments: 4

Patch Set 17 : Do it the other way + explicit checks that it is a mouse pointer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+612 lines, -48 lines) Patch
M components/mus/public/cpp/lib/in_flight_change.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +20 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/in_flight_change.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +20 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/window_private.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/window_tree_client_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/window_tree_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +28 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/test_window_tree.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/test_window_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M components/mus/public/cpp/window.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -0 lines 0 comments Download
M components/mus/public/cpp/window_observer.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/public/interfaces/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
A components/mus/public/interfaces/cursor.mojom View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
M components/mus/public/interfaces/window_tree.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +10 lines, -0 lines 0 comments Download
M components/mus/ws/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/access_policy.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/ws/connection_manager.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M components/mus/ws/connection_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +22 lines, -0 lines 0 comments Download
M components/mus/ws/default_access_policy.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/default_access_policy.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M components/mus/ws/display_manager.h View 1 4 chunks +8 lines, -0 lines 0 comments Download
M components/mus/ws/display_manager.cc View 1 2 3 chunks +17 lines, -0 lines 0 comments Download
M components/mus/ws/event_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +8 lines, -0 lines 0 comments Download
M components/mus/ws/event_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +30 lines, -1 line 0 comments Download
M components/mus/ws/operation.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/server_window.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
M components/mus/ws/server_window.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -0 lines 0 comments Download
M components/mus/ws/server_window_observer.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/ws/test_change_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -0 lines 0 comments Download
M components/mus/ws/test_change_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +15 lines, -0 lines 0 comments Download
M components/mus/ws/window_manager_access_policy.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/window_manager_access_policy.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_apptest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +25 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +9 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +23 lines, -1 line 0 comments Download
M components/mus/ws/window_tree_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +24 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +169 lines, -44 lines 0 comments Download
M ui/platform_window/x11/x11_window.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/views/mus/native_widget_mus.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -1 line 0 comments Download
M ui/views/mus/platform_window_mus.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -0 lines 0 comments Download
M ui/views/mus/platform_window_mus.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
Elliot Glaysher
sky: there are a whole bunch of other properties (visibility, image cursors) that also need ...
5 years ago (2015-12-01 19:29:14 UTC) #3
sky
https://codereview.chromium.org/1465803003/diff/140001/components/mus/public/cpp/lib/window.cc File components/mus/public/cpp/lib/window.cc (right): https://codereview.chromium.org/1465803003/diff/140001/components/mus/public/cpp/lib/window.cc#newcode367 components/mus/public/cpp/lib/window.cc:367: tree_client()->SetStandardCursor(id_, cursor_id); In general we tend to assume the ...
5 years ago (2015-12-01 21:48:01 UTC) #4
Elliot Glaysher
ptal Changed to PredefinedCursor, and added a Cursor Operation. https://codereview.chromium.org/1465803003/diff/140001/components/mus/public/interfaces/window_tree.mojom File components/mus/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/1465803003/diff/140001/components/mus/public/interfaces/window_tree.mojom#newcode210 components/mus/public/interfaces/window_tree.mojom:210: ...
5 years ago (2015-12-02 20:01:32 UTC) #5
sky
https://codereview.chromium.org/1465803003/diff/140001/components/mus/ws/window_tree_host_impl.cc File components/mus/ws/window_tree_host_impl.cc (right): https://codereview.chromium.org/1465803003/diff/140001/components/mus/ws/window_tree_host_impl.cc#newcode137 components/mus/ws/window_tree_host_impl.cc:137: if (window == event_dispatcher_.last_targeted_window()) On 2015/12/02 20:01:32, Elliot Glaysher ...
5 years ago (2015-12-02 21:19:41 UTC) #6
sky
https://codereview.chromium.org/1465803003/diff/200001/components/mus/public/cpp/lib/in_flight_change.cc File components/mus/public/cpp/lib/in_flight_change.cc (right): https://codereview.chromium.org/1465803003/diff/200001/components/mus/public/cpp/lib/in_flight_change.cc#newcode100 components/mus/public/cpp/lib/in_flight_change.cc:100: return static_cast<const InFlightPredefinedCursorChange&>(change) You shouldn't need to override Matches. ...
5 years ago (2015-12-02 21:42:35 UTC) #7
Elliot Glaysher
Renaming, explicit, other comments addressed. On 2015/12/02 21:19:41, sky wrote: > On 2015/12/02 20:01:32, Elliot ...
5 years ago (2015-12-03 00:54:57 UTC) #8
sky
https://codereview.chromium.org/1465803003/diff/280001/components/mus/ws/event_dispatcher.cc File components/mus/ws/event_dispatcher.cc (right): https://codereview.chromium.org/1465803003/diff/280001/components/mus/ws/event_dispatcher.cc#newcode227 components/mus/ws/event_dispatcher.cc:227: DCHECK(event->action == mojom::EVENT_TYPE_POINTER_DOWN); This should be the place you ...
5 years ago (2015-12-03 03:23:18 UTC) #9
sky
On 2015/12/03 00:54:57, Elliot Glaysher wrote: > Renaming, explicit, other comments addressed. > > On ...
5 years ago (2015-12-03 03:24:42 UTC) #10
Elliot Glaysher
- Moved the implementation of tracking the pointer. - Added comment to handle the programmatic ...
5 years ago (2015-12-03 21:09:30 UTC) #11
sky
https://codereview.chromium.org/1465803003/diff/300001/components/mus/public/cpp/lib/window_tree_client_impl.cc File components/mus/public/cpp/lib/window_tree_client_impl.cc (right): https://codereview.chromium.org/1465803003/diff/300001/components/mus/public/cpp/lib/window_tree_client_impl.cc#newcode619 components/mus/public/cpp/lib/window_tree_client_impl.cc:619: FOR_EACH_OBSERVER(WindowObserver, *WindowPrivate(window).observers(), You need two things here: 1. If ...
5 years ago (2015-12-03 22:01:10 UTC) #12
Elliot Glaysher
https://codereview.chromium.org/1465803003/diff/300001/components/mus/public/cpp/lib/window_tree_client_impl.cc File components/mus/public/cpp/lib/window_tree_client_impl.cc (right): https://codereview.chromium.org/1465803003/diff/300001/components/mus/public/cpp/lib/window_tree_client_impl.cc#newcode619 components/mus/public/cpp/lib/window_tree_client_impl.cc:619: FOR_EACH_OBSERVER(WindowObserver, *WindowPrivate(window).observers(), On 2015/12/03 22:01:10, sky wrote: > You ...
5 years ago (2015-12-03 22:32:00 UTC) #13
sky
LGTM
5 years ago (2015-12-03 23:39:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1465803003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1465803003/320001
5 years ago (2015-12-03 23:44:16 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1465803003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1465803003/320001
5 years ago (2015-12-04 18:09:07 UTC) #19
commit-bot: I haz the power
Committed patchset #17 (id:320001)
5 years ago (2015-12-04 18:51:58 UTC) #21
commit-bot: I haz the power
5 years ago (2015-12-04 18:52:52 UTC) #23
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/314e9981a45aa20338d87c1952977603b051c725
Cr-Commit-Position: refs/heads/master@{#363261}

Powered by Google App Engine
This is Rietveld 408576698