Commit f3c784b4 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Notify login shelf when oobe ui dialog is hidden

When OOBE dialog is hidden, the login shelf should be notified, so it
can clear its cached dialog_state_. Otherwise, it will keep using the
cached dialog state when calculating shutdown button visibility, and
the button will remain hidden if the lock screen is shown later in the
session.

BUG=1051826

Change-Id: Id3fba45fd912a3eca2cc5b62b0e66f787d6e91d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2058999Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743138}
parent 3461f451
...@@ -887,6 +887,11 @@ void LoginDisplayHostWebUI::InitLoginWindowAndView() { ...@@ -887,6 +887,11 @@ void LoginDisplayHostWebUI::InitLoginWindowAndView() {
} }
void LoginDisplayHostWebUI::ResetLoginWindowAndView() { void LoginDisplayHostWebUI::ResetLoginWindowAndView() {
// Notify any oobe dialog state observers (e.g. login shelf) that the UI is
// hidden (so they can reset any cached OOBE dialog state.)
ash::LoginScreen::Get()->GetModel()->NotifyOobeDialogState(
ash::OobeDialogState::HIDDEN);
// Make sure to reset the |login_view_| pointer first; it is owned by // Make sure to reset the |login_view_| pointer first; it is owned by
// |login_window_|. Closing |login_window_| could immediately invalidate the // |login_window_|. Closing |login_window_| could immediately invalidate the
// |login_view_| pointer. // |login_view_| pointer.
......
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