That isn't the case though. OnWindowVisibilityChanged() may be supplied a different window.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/598ab1479d421bc56bec0659bb6aacfaed6d6959 commit 598ab1479d421bc56bec0659bb6aacfaed6d6959 Author: sky <sky@chromium.org> Date: Tue Sep 27 19:36:59 2016 Fixes bug in WmWindowAura::OnWindowVisibilityChanged() The code was assuming window was this->window_, which is not necessarily the case. BUG= 650755 TEST=none R=oshima@chromium.org Review-Url: https://codereview.chromium.org/2369413002 Cr-Commit-Position: refs/heads/master@{#421298} [modify] https://crrev.com/598ab1479d421bc56bec0659bb6aacfaed6d6959/ash/aura/wm_window_aura.cc [modify] https://crrev.com/598ab1479d421bc56bec0659bb6aacfaed6d6959/ui/aura/window_observer.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c commit 3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c Author: sky <sky@chromium.org> Date: Wed Sep 28 20:44:28 2016 Test coverage for bug in WmWindowAura::OnWindowVisibilityChanged() Also gets mus side working too. BUG= 650755 TEST=none R=jamescook@chromium.org Review-Url: https://codereview.chromium.org/2377853002 Cr-Commit-Position: refs/heads/master@{#421633} [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/BUILD.gn [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/common/test/ash_test.cc [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/common/test/ash_test.h [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/common/wm_window_observer.h [add] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/common/wm_window_unittest.cc [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/mus/BUILD.gn [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/mus/bridge/wm_window_mus.cc [modify] https://crrev.com/3fdae2f73beeb79c2b1f2c964e3fd290c4bb3e6c/ash/mus/bridge/wm_window_mus.h
Closing bug as per comment #3
Comment 1 by bugdroid1@chromium.org
, Sep 28 2016