Commit 400802e2 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

macviews: fix UserManager::IsShowing

This method did the wrong thing in Mac Views mode. Fixing it
fixes most of the AppControllerNewProfileManagementBrowserTest
suite.

Bug: 834754
Change-Id: I9e2971b4e5d3cff12a1629f70c96a5cb65e40aa1
Reviewed-on: https://chromium-review.googlesource.com/1020021Reviewed-by: default avatarSidney San Martín <sdy@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552125}
parent 4e1aa3d3
......@@ -194,6 +194,13 @@ bool UserManager::IsShowing() {
#if defined(OS_MACOSX)
if (views_mode_controller::IsViewsBrowserCocoa()) {
return UserManager::IsShowingCocoa();
} else {
// Widget activation works differently on Mac: the UserManager is a child
// widget, so it is not active in the IsActive() sense even when showing
// and interactable. Test for IsVisible instead - this is what the Cocoa
// UserManager::IsShowing() does as well.
return g_user_manager_view ? g_user_manager_view->GetWidget()->IsVisible()
: false;
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment