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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc

Issue 1688343002: Fix the mis-showing of the panel window during profile switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address oshima@'s comment. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
index bef7236f5695bf21d71ac30fff8af0385b574c1e..fb915b21df86b9c4ddae4d02b84198b3bd8384c6 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
@@ -627,7 +627,11 @@ bool MultiUserWindowManagerChromeOS::ShowWindowForUserIntern(
void MultiUserWindowManagerChromeOS::SetWindowVisibility(
aura::Window* window, bool visible, int animation_time_in_ms) {
- if (window->IsVisible() == visible)
+ // For a panel window, it's possible that this panel window is in the middle
+ // of relayout animation because of hiding/reshowing shelf during profile
+ // switch. Thus the window's visibility might not be its real visibility. See
+ // crbug.com/564725 for more info.
+ if (window->TargetVisibility() == visible)
Mr4D (OOO till 08-26) 2016/02/12 00:34:01 Oh nice! Yes, that makes sense!
return;
// Hiding a system modal dialog should not be allowed. Instead we switch to
@@ -778,10 +782,6 @@ void MultiUserWindowManagerChromeOS::SetWindowVisible(
window->Show();
else
window->Hide();
-
- // Make sure that animations have no influence on the window state after the
- // call.
- DCHECK_EQ(visible, window->IsVisible());
}
int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698