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

Issue 1605773004: mus: Implement Window Server Capture (Closed)

Created:
4 years, 11 months ago by jonross
Modified:
4 years, 10 months ago
Reviewers:
fsamuel, sky
CC:
chromium-reviews, rjkroege, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, 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: Implement Window Server Capture This CL implements an explicit capture API that will be used for popups. This is an uprev of the original review: https://codereview.chromium.org/1352043005/ TEST=WindowTest.SetCapture, EventDispatcherTest.SetExplicitCapture, EventDispatcherTest.ExplicitCaptureOverridesImplicitCapture, EventDispatcherTest.CaptureUpdatesActivePointerTargets, EventDispatcherTest.UpdatingCaptureStopsObservingPreviousCaputre, EventDispatcherTest.DestroyingCaptureWindowRemovesExplicitCapture, WindowTreeAppTest.ExplicitCapturePropagation, BUG=533161

Patch Set 1 : Original Change #

Patch Set 2 : Update Changes Calls #

Patch Set 3 : Unittest Fix #

Patch Set 4 : Fix App Test #

Patch Set 5 : Address Original Review Comments #

Total comments: 29

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : Rebase #

Total comments: 20

Patch Set 9 : #

Total comments: 4

Patch Set 10 : Create InFlightCaptureChange add tests #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+1090 lines, -318 lines) Patch
M components/mus/public/cpp/lib/in_flight_change.h View 1 2 3 4 5 6 7 8 9 2 chunks +17 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 1 chunk +19 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/window.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -0 lines 0 comments Download
M components/mus/public/cpp/lib/window_private.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -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 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 2 chunks +26 lines, -0 lines 2 comments Download
M components/mus/public/cpp/tests/test_window_tree.h View 1 2 3 4 5 6 7 1 chunk +2 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 1 chunk +10 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +35 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/window_unittest.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M components/mus/public/cpp/window.h View 1 2 3 4 3 chunks +6 lines, -0 lines 0 comments Download
M components/mus/public/cpp/window_observer.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/public/interfaces/window_tree.mojom View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -0 lines 0 comments Download
M components/mus/ws/access_policy.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/connection_manager.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/connection_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M components/mus/ws/default_access_policy.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/default_access_policy.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M components/mus/ws/display_manager.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M components/mus/ws/display_manager.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -1 line 0 comments Download
M components/mus/ws/display_manager_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/ws/event_dispatcher.h View 1 2 3 4 5 3 chunks +10 lines, -0 lines 0 comments Download
M components/mus/ws/event_dispatcher.cc View 1 2 3 4 5 6 7 8 9 5 chunks +94 lines, -22 lines 1 comment Download
M components/mus/ws/event_dispatcher_delegate.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/mus/ws/event_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 11 chunks +580 lines, -295 lines 0 comments Download
M components/mus/ws/operation.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/mus/ws/test_change_tracker.h View 2 chunks +2 lines, -0 lines 0 comments Download
M components/mus/ws/test_change_tracker.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M components/mus/ws/window_manager_access_policy.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/window_manager_access_policy.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_apptest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +58 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_host_impl.h View 1 2 3 4 5 6 7 8 4 chunks +13 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 3 chunks +21 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_impl.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +43 lines, -0 lines 0 comments Download
M components/mus/ws/window_tree_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +48 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (5 generated)
jonross
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc File components/mus/ws/event_dispatcher.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc#newcode185 components/mus/ws/event_dispatcher.cc:185: std::set<ServerWindow*> unobserved_windows; There was a comment in the previous ...
4 years, 11 months ago (2016-01-21 22:01:12 UTC) #4
jonross
Hi Sky, I've updated a previous review for implementing Window Server Capture. Including addressing the ...
4 years, 11 months ago (2016-01-21 22:02:04 UTC) #6
sky
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc File components/mus/ws/event_dispatcher.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc#newcode179 components/mus/ws/event_dispatcher.cc:179: void EventDispatcher::SetCaptureWindow(ServerWindow* window) { You need to also pass ...
4 years, 11 months ago (2016-01-22 00:55:00 UTC) #7
jonross
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc File components/mus/ws/event_dispatcher.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc#newcode179 components/mus/ws/event_dispatcher.cc:179: void EventDispatcher::SetCaptureWindow(ServerWindow* window) { On 2016/01/22 00:55:00, sky wrote: ...
4 years, 11 months ago (2016-01-22 20:31:28 UTC) #8
sky
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc File components/mus/ws/event_dispatcher.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc#newcode179 components/mus/ws/event_dispatcher.cc:179: void EventDispatcher::SetCaptureWindow(ServerWindow* window) { On 2016/01/22 20:31:28, jonross wrote: ...
4 years, 11 months ago (2016-01-22 22:15:37 UTC) #9
jonross
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc File components/mus/ws/event_dispatcher.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/event_dispatcher.cc#newcode179 components/mus/ws/event_dispatcher.cc:179: void EventDispatcher::SetCaptureWindow(ServerWindow* window) { On 2016/01/22 22:15:37, sky wrote: ...
4 years, 11 months ago (2016-01-26 18:38:51 UTC) #10
sky
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/window_tree_impl.cc File components/mus/ws/window_tree_impl.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/window_tree_impl.cc#newcode922 components/mus/ws/window_tree_impl.cc:922: access_policy_->CanSetCapture(host->GetCaptureWindow()); On 2016/01/26 18:38:50, jonross wrote: > > Generally ...
4 years, 11 months ago (2016-01-26 22:11:14 UTC) #11
jonross
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/window_tree_impl.cc File components/mus/ws/window_tree_impl.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/window_tree_impl.cc#newcode922 components/mus/ws/window_tree_impl.cc:922: access_policy_->CanSetCapture(host->GetCaptureWindow()); On 2016/01/26 22:11:14, sky wrote: > On 2016/01/26 ...
4 years, 11 months ago (2016-01-26 22:35:15 UTC) #12
jonross
https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/window_tree_impl.cc File components/mus/ws/window_tree_impl.cc (right): https://codereview.chromium.org/1605773004/diff/100001/components/mus/ws/window_tree_impl.cc#newcode922 components/mus/ws/window_tree_impl.cc:922: access_policy_->CanSetCapture(host->GetCaptureWindow()); On 2016/01/26 22:35:15, jonross wrote: > On 2016/01/26 ...
4 years, 11 months ago (2016-01-27 21:15:13 UTC) #13
jonross
Updated so that an active event is required for requesting capture to succeed. Also rebased ...
4 years, 10 months ago (2016-01-29 17:00:50 UTC) #14
sky
https://codereview.chromium.org/1605773004/diff/160001/components/mus/public/interfaces/window_tree.mojom File components/mus/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/1605773004/diff/160001/components/mus/public/interfaces/window_tree.mojom#newcode112 components/mus/public/interfaces/window_tree.mojom:112: SetCapture(uint32 change_id, uint32 window_id); Document capture is only allowed ...
4 years, 10 months ago (2016-01-29 20:47:00 UTC) #15
jonross
https://codereview.chromium.org/1605773004/diff/160001/components/mus/public/interfaces/window_tree.mojom File components/mus/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/1605773004/diff/160001/components/mus/public/interfaces/window_tree.mojom#newcode112 components/mus/public/interfaces/window_tree.mojom:112: SetCapture(uint32 change_id, uint32 window_id); On 2016/01/29 20:47:00, sky wrote: ...
4 years, 10 months ago (2016-02-01 18:52:22 UTC) #16
sky
https://codereview.chromium.org/1605773004/diff/180001/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/1605773004/diff/180001/components/mus/public/cpp/lib/window_tree_client_impl.cc#newcode251 components/mus/public/cpp/lib/window_tree_client_impl.cc:251: new CrashInFlightChange(window, ChangeType::SET_CAPTURE))); We need to handle requests for ...
4 years, 10 months ago (2016-02-01 20:43:33 UTC) #17
jonross
https://codereview.chromium.org/1605773004/diff/180001/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/1605773004/diff/180001/components/mus/public/cpp/lib/window_tree_client_impl.cc#newcode251 components/mus/public/cpp/lib/window_tree_client_impl.cc:251: new CrashInFlightChange(window, ChangeType::SET_CAPTURE))); On 2016/02/01 20:43:33, sky wrote: > ...
4 years, 10 months ago (2016-02-03 18:52:17 UTC) #19
sky
https://codereview.chromium.org/1605773004/diff/220001/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/1605773004/diff/220001/components/mus/public/cpp/lib/window_tree_client_impl.cc#newcode251 components/mus/public/cpp/lib/window_tree_client_impl.cc:251: make_scoped_ptr(new InFlightCaptureChange(window, false))); false (and true on 260) should ...
4 years, 10 months ago (2016-02-03 21:59:01 UTC) #20
jonross
4 years, 10 months ago (2016-02-05 15:24:26 UTC) #21
On 2016/02/03 21:59:01, sky wrote:
>
https://codereview.chromium.org/1605773004/diff/220001/components/mus/public/...
> File components/mus/public/cpp/lib/window_tree_client_impl.cc (right):
> 
>
https://codereview.chromium.org/1605773004/diff/220001/components/mus/public/...
> components/mus/public/cpp/lib/window_tree_client_impl.cc:251:
> make_scoped_ptr(new InFlightCaptureChange(window, false)));
> false (and true on 260) should come from the capture state of the window.
> 
>
https://codereview.chromium.org/1605773004/diff/220001/components/mus/public/...
> components/mus/public/cpp/lib/window_tree_client_impl.cc:577: if (window) {
> This potentially needs to update the capture state of the window. See
> OnWindowBoundsChanged for an example of what you need to do.
> 
>
https://codereview.chromium.org/1605773004/diff/220001/components/mus/ws/even...
> File components/mus/ws/event_dispatcher.cc (right):
> 
>
https://codereview.chromium.org/1605773004/diff/220001/components/mus/ws/even...
> components/mus/ws/event_dispatcher.cc:338:
> UpdateCursorProviderByLastKnownLocation();
> You should do this in SetCapture(null) if mouse_button_down_ is false.

This review is being split into both a window server implementation, as well as
client lib.

The review for the window server can be found here:
https://codereview.chromium.org/1677513002/
The client lib will follow.

I'm closing this review.

Powered by Google App Engine
This is Rietveld 408576698