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

Issue 2714763002: Change FocusSynchronizer to maintain active focus client and window. (Closed)

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

Description

Change FocusSynchronizer to maintain active focus client and window. Deleted all active focus client and active focus client root maintaining code from aura::Env and updated FocusSynchronizer to be the place that keeps track of them. All clients that used to be the EnvObserver to get notified for active focus client and active focus client root changes are now changed to be the observer for FocusSynchronizer to get notified. Moved kFocusClientKey definition from FocusClient to aura_constants. BUG=699324 TEST=covered by tests (aura_unittests and views_mus_unittests) Review-Url: https://codereview.chromium.org/2714763002 Cr-Commit-Position: refs/heads/master@{#460963} Committed: https://chromium.googlesource.com/chromium/src/+/86a7cee9063b92b30353bfa0e32c3bfb24625593

Patch Set 1 #

Patch Set 2 : fix crash in aura_test_helper tear down #

Total comments: 1

Patch Set 3 : FocusChangeObserver #

Patch Set 4 : HandleActivationChanged #

Patch Set 5 : switch back to use FocusSynchronizerObserver #

Total comments: 12

Patch Set 6 : comment #

Patch Set 7 : check #

Patch Set 8 : test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -172 lines) Patch
M components/exo/wm_helper_mus.h View 1 2 3 4 3 chunks +4 lines, -5 lines 0 comments Download
M components/exo/wm_helper_mus.cc View 1 2 3 4 3 chunks +14 lines, -9 lines 0 comments Download
M ui/aura/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/client/aura_constants.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M ui/aura/client/aura_constants.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M ui/aura/client/focus_client.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/aura/client/focus_client.cc View 1 chunk +1 line, -4 lines 0 comments Download
M ui/aura/env.h View 1 2 3 4 4 chunks +0 lines, -22 lines 0 comments Download
M ui/aura/env.cc View 1 2 3 4 5 chunks +0 lines, -54 lines 0 comments Download
M ui/aura/env_observer.h View 2 chunks +0 lines, -8 lines 0 comments Download
M ui/aura/mus/focus_synchronizer.h View 1 2 3 4 5 2 chunks +39 lines, -11 lines 0 comments Download
M ui/aura/mus/focus_synchronizer.cc View 1 2 3 4 5 6 6 chunks +59 lines, -25 lines 0 comments Download
A ui/aura/mus/focus_synchronizer_observer.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
M ui/aura/mus/window_tree_client.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/mus/window_tree_client_unittest.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -1 line 0 comments Download
M ui/aura/test/aura_test_helper.cc View 1 2 3 4 5 6 4 chunks +5 lines, -3 lines 0 comments Download
M ui/views/mus/desktop_window_tree_host_mus.h View 1 2 3 4 4 chunks +7 lines, -8 lines 0 comments Download
M ui/views/mus/desktop_window_tree_host_mus.cc View 1 2 3 4 5 6 6 chunks +20 lines, -17 lines 0 comments Download
M ui/views/mus/desktop_window_tree_host_mus_unittest.cc View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 52 (38 generated)
riajiang
Hi sadrul@ and sky@, PTAL, thanks!
3 years, 9 months ago (2017-03-08 01:18:31 UTC) #6
sadrul
https://codereview.chromium.org/2714763002/diff/80001/ui/views/mus/desktop_window_tree_host_mus.cc File ui/views/mus/desktop_window_tree_host_mus.cc (right): https://codereview.chromium.org/2714763002/diff/80001/ui/views/mus/desktop_window_tree_host_mus.cc#newcode770 ui/views/mus/desktop_window_tree_host_mus.cc:770: if (window == this->window()) { Could it not do ...
3 years, 9 months ago (2017-03-09 02:01:23 UTC) #11
riajiang
As discussed with sadrul@ offline, keeping FocusSynchronizerObserver for active_focus_client and active_focus_client_root changes for DesktopWindowTreeHostMus and ...
3 years, 9 months ago (2017-03-23 19:50:44 UTC) #23
sky
On 2017/03/23 19:50:44, riajiang wrote: > As discussed with sadrul@ offline, keeping FocusSynchronizerObserver for > ...
3 years, 9 months ago (2017-03-23 23:02:43 UTC) #28
sky
Also, you will need an exo reviewer
3 years, 9 months ago (2017-03-23 23:02:56 UTC) #29
sadrul
https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc File ui/aura/mus/focus_synchronizer.cc (right): https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc#newcode68 ui/aura/mus/focus_synchronizer.cc:68: active_focus_client_root_->AddObserver(this); Wrap this inside an if (active_focus_client_root_ != focus_client_root) ...
3 years, 8 months ago (2017-03-28 15:03:23 UTC) #30
riajiang
https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc File ui/aura/mus/focus_synchronizer.cc (right): https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc#newcode68 ui/aura/mus/focus_synchronizer.cc:68: active_focus_client_root_->AddObserver(this); On 2017/03/28 15:03:23, sadrul wrote: > Wrap this ...
3 years, 8 months ago (2017-03-28 22:07:27 UTC) #31
sadrul
https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc File ui/aura/mus/focus_synchronizer.cc (right): https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc#newcode68 ui/aura/mus/focus_synchronizer.cc:68: active_focus_client_root_->AddObserver(this); On 2017/03/28 22:07:27, riajiang wrote: > On 2017/03/28 ...
3 years, 8 months ago (2017-03-29 16:13:19 UTC) #32
riajiang
https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc File ui/aura/mus/focus_synchronizer.cc (right): https://codereview.chromium.org/2714763002/diff/180001/ui/aura/mus/focus_synchronizer.cc#newcode68 ui/aura/mus/focus_synchronizer.cc:68: active_focus_client_root_->AddObserver(this); On 2017/03/29 16:13:19, sadrul wrote: > On 2017/03/28 ...
3 years, 8 months ago (2017-03-29 17:27:35 UTC) #33
sadrul
lgtm
3 years, 8 months ago (2017-03-29 19:52:11 UTC) #34
riajiang
+reveman@, could you take a look at components/exo? Thanks!
3 years, 8 months ago (2017-03-29 19:54:57 UTC) #36
reveman
components/exo lgtm
3 years, 8 months ago (2017-03-29 20:40:56 UTC) #37
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/2714763002/260001
3 years, 8 months ago (2017-03-31 00:41:55 UTC) #49
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 00:57:14 UTC) #52
Message was sent while issue was closed.
Committed patchset #8 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/86a7cee9063b92b30353bfa0e32c...

Powered by Google App Engine
This is Rietveld 408576698