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

Issue 2626013005: Change CaptureSynchronizer and PointerWatcherEventRouter to support multiple CaptureClients. (Closed)

Created:
3 years, 11 months ago by riajiang
Modified:
3 years, 10 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, kalyank, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change CaptureSynchronizer and PointerWatcherEventRouter to support multiple CaptureClients. DesktopNativeWidgetAura was using DesktopCaptureClient but CaptureSynchronizer was only supporting one CaptureClient, which is a CaptureController. Therefore made the following changes: 1. We have one CaptureController for ash and multiple DesktopCaptureClients for all mus clients. This CL changes CaptureSynchronizer and PointerWatcherEventRouter to support multiple CaptureClients. When a root window's capture client is set, MusClient will be notified by DesktopWindowTreeHostMus if it's a DesktopCaptureClient, and WindowManager will take care of CaptureController. We then add CaptureSynchronizer and PointerWatcherEventRouter to be the observer for that CaptureClient. 2. Update DesktopCaptureClient to notify its observers when capture has changed. BUG=676002, 678057 TEST=aura_unittests views_mus_unittests Review-Url: https://codereview.chromium.org/2626013005 Cr-Original-Commit-Position: refs/heads/master@{#447621} Committed: https://chromium.googlesource.com/chromium/src/+/e75f053a801b6a6322a57a9417582f14ebc3f161 Review-Url: https://codereview.chromium.org/2626013005 Cr-Commit-Position: refs/heads/master@{#447790} Committed: https://chromium.googlesource.com/chromium/src/+/f6a5c39ae29d703bb4ecc6663477de3f9d3284a6

Patch Set 1 #

Total comments: 2

Patch Set 2 : another approach to attach capture client #

Total comments: 14

Patch Set 3 : another approach + PointerWatcherEventRouter + ImmersiveContextMus #

Patch Set 4 : separate changes to ImmersiveContextMus into another CL #

Patch Set 5 : separate out changes for removing GetCaptureClient() #

Total comments: 5

Patch Set 6 : comments; sequence; test #

Total comments: 7

Patch Set 7 : comment #

Patch Set 8 : rebase #

Patch Set 9 : test #

Patch Set 10 : fix leak in test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -28 lines) Patch
M ash/mus/window_manager.cc View 1 2 3 4 5 6 7 3 chunks +13 lines, -0 lines 0 comments Download
M ui/aura/mus/capture_synchronizer.h View 1 2 3 4 5 3 chunks +7 lines, -5 lines 0 comments Download
M ui/aura/mus/capture_synchronizer.cc View 1 2 3 4 5 6 2 chunks +33 lines, -14 lines 0 comments Download
M ui/aura/mus/window_tree_client.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M ui/aura/mus/window_tree_client.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M ui/aura/mus/window_tree_client_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +74 lines, -0 lines 0 comments Download
M ui/aura/test/aura_test_helper.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M ui/views/mus/desktop_window_tree_host_mus.cc View 1 2 3 4 5 3 chunks +7 lines, -0 lines 0 comments Download
M ui/views/mus/desktop_window_tree_host_mus_unittest.cc View 1 2 3 4 5 6 7 2 chunks +47 lines, -0 lines 0 comments Download
M ui/views/mus/mus_client.h View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M ui/views/mus/mus_client.cc View 1 2 3 4 5 2 chunks +15 lines, -0 lines 0 comments Download
M ui/views/mus/pointer_watcher_event_router.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M ui/views/mus/pointer_watcher_event_router.cc View 1 2 3 4 5 3 chunks +11 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_capture_client.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_capture_client.cc View 1 2 3 4 5 3 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 48 (27 generated)
riajiang
This CL fixes the bug (for most of the times) where DesktopNativeWidgetAura (e.g. context menu, ...
3 years, 11 months ago (2017-01-16 21:18:34 UTC) #4
sadrul
https://codereview.chromium.org/2626013005/diff/20001/ui/aura/mus/capture_synchronizer.cc File ui/aura/mus/capture_synchronizer.cc (right): https://codereview.chromium.org/2626013005/diff/20001/ui/aura/mus/capture_synchronizer.cc#newcode57 ui/aura/mus/capture_synchronizer.cc:57: Attach(client::GetCaptureClient(window)); So, this sort of suck a little bit. ...
3 years, 11 months ago (2017-01-18 22:14:45 UTC) #5
riajiang
https://codereview.chromium.org/2626013005/diff/20001/ui/aura/mus/capture_synchronizer.cc File ui/aura/mus/capture_synchronizer.cc (right): https://codereview.chromium.org/2626013005/diff/20001/ui/aura/mus/capture_synchronizer.cc#newcode57 ui/aura/mus/capture_synchronizer.cc:57: Attach(client::GetCaptureClient(window)); On 2017/01/18 22:14:44, sadrul wrote: > So, this ...
3 years, 11 months ago (2017-01-20 20:14:28 UTC) #7
sadrul
https://codereview.chromium.org/2626013005/diff/60001/ui/aura/client/capture_client.h File ui/aura/client/capture_client.h (right): https://codereview.chromium.org/2626013005/diff/60001/ui/aura/client/capture_client.h#newcode55 ui/aura/client/capture_client.h:55: kRootWindowCaptureClientKey; Can you move this into aura_constants.h? since the ...
3 years, 11 months ago (2017-01-21 03:23:37 UTC) #8
riajiang
Hi sadrul@, changed to use another approach and updated PointerWatcherEventRouter etc. CL description has detailed ...
3 years, 11 months ago (2017-01-24 19:36:22 UTC) #10
sadrul
Can you add some tests for the views side of the changes? https://codereview.chromium.org/2626013005/diff/160001/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc ...
3 years, 11 months ago (2017-01-27 01:06:54 UTC) #15
sadrul
Also, thanks a lot for splitting up the CL into smaller chunks! Can you update ...
3 years, 11 months ago (2017-01-27 01:07:27 UTC) #16
riajiang
Also added tests and updated descriptions. PTAL, thanks! https://codereview.chromium.org/2626013005/diff/160001/ui/views/mus/mus_client.cc File ui/views/mus/mus_client.cc (right): https://codereview.chromium.org/2626013005/diff/160001/ui/views/mus/mus_client.cc#newcode227 ui/views/mus/mus_client.cc:227: window_tree_client_->OnCaptureClientSet(capture_client); ...
3 years, 10 months ago (2017-01-30 18:36:22 UTC) #18
sadrul
lgtm https://codereview.chromium.org/2626013005/diff/180001/ui/aura/mus/capture_synchronizer.cc File ui/aura/mus/capture_synchronizer.cc (right): https://codereview.chromium.org/2626013005/diff/180001/ui/aura/mus/capture_synchronizer.cc#newcode27 ui/aura/mus/capture_synchronizer.cc:27: // Don't immediately set capture client. It's possible ...
3 years, 10 months ago (2017-01-30 19:37:59 UTC) #20
riajiang
Also +sky@, could you take a look? Thanks! https://codereview.chromium.org/2626013005/diff/180001/ui/aura/mus/capture_synchronizer.cc File ui/aura/mus/capture_synchronizer.cc (right): https://codereview.chromium.org/2626013005/diff/180001/ui/aura/mus/capture_synchronizer.cc#newcode27 ui/aura/mus/capture_synchronizer.cc:27: // ...
3 years, 10 months ago (2017-01-30 20:24:10 UTC) #22
sadrul
https://codereview.chromium.org/2626013005/diff/180001/ui/views/mus/pointer_watcher_event_router.cc File ui/views/mus/pointer_watcher_event_router.cc (right): https://codereview.chromium.org/2626013005/diff/180001/ui/views/mus/pointer_watcher_event_router.cc#newcode172 ui/views/mus/pointer_watcher_event_router.cc:172: window_tree_client_ = nullptr; On 2017/01/30 20:24:09, riajiang wrote: > ...
3 years, 10 months ago (2017-01-30 20:52:12 UTC) #23
sky
As there can only be a single CaptureClient with capture at once is there a ...
3 years, 10 months ago (2017-01-31 00:52:27 UTC) #24
sadrul
On 2017/01/31 00:52:27, sky wrote: > As there can only be a single CaptureClient with ...
3 years, 10 months ago (2017-01-31 19:03:30 UTC) #25
sky
Fair enough, LGTM
3 years, 10 months ago (2017-01-31 23:29:19 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2626013005/240001
3 years, 10 months ago (2017-02-01 21:00:23 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:240001) as https://chromium.googlesource.com/chromium/src/+/e75f053a801b6a6322a57a9417582f14ebc3f161
3 years, 10 months ago (2017-02-01 22:00:34 UTC) #36
johnme
A revert of this CL (patchset #9 id:240001) has been created in https://codereview.chromium.org/2674683002/ by johnme@chromium.org. ...
3 years, 10 months ago (2017-02-02 12:59:19 UTC) #37
sadrul
On 2017/02/02 12:59:19, johnme wrote: > A revert of this CL (patchset #9 id:240001) has ...
3 years, 10 months ago (2017-02-02 13:52:32 UTC) #38
riajiang
On 2017/02/02 13:52:32, sadrul wrote: > On 2017/02/02 12:59:19, johnme wrote: > > A revert ...
3 years, 10 months ago (2017-02-02 16:35:21 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2626013005/260001
3 years, 10 months ago (2017-02-02 16:36:02 UTC) #43
commit-bot: I haz the power
3 years, 10 months ago (2017-02-02 17:38:35 UTC) #46
Message was sent while issue was closed.
Committed patchset #10 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/f6a5c39ae29d703bb4ecc6663477...

Powered by Google App Engine
This is Rietveld 408576698