Commit f0a94e7a authored by Jacob Dufault's avatar Jacob Dufault Committed by Commit Bot

cros: Send NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE for views login/lock

It'd be better to remove the notification entirely, but there are still some
users of this notification, like accessibility and power. I suspect the correct
long-term fix is to migrate these users to session state changed observers.

Bug: 784495
Change-Id: I5a60f4ff4010cb11e541415bea11245766dd6eeb
Reviewed-on: https://chromium-review.googlesource.com/964713
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550698}
parent 08665753
...@@ -226,6 +226,11 @@ void ScreenLocker::Init() { ...@@ -226,6 +226,11 @@ void ScreenLocker::Init() {
[](ViewsScreenLocker* screen_locker, bool did_show) { [](ViewsScreenLocker* screen_locker, bool did_show) {
CHECK(did_show); CHECK(did_show);
screen_locker->OnLockScreenReady(); screen_locker->OnLockScreenReady();
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
content::NotificationService::AllSources(),
content::NotificationService::NoDetails());
}, },
views_screen_locker_.get())); views_screen_locker_.get()));
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/login/ui/login_display_mojo.h" #include "chrome/browser/chromeos/login/ui/login_display_mojo.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h"
#include "chrome/browser/chromeos/login/screens/user_selection_screen.h" #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_mojo.h" #include "chrome/browser/chromeos/login/ui/login_display_host_mojo.h"
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h" #include "chromeos/dbus/session_manager_client.h"
#include "components/user_manager/known_user.h" #include "components/user_manager/known_user.h"
#include "content/public/browser/notification_service.h"
namespace chromeos { namespace chromeos {
...@@ -55,6 +57,11 @@ void LoginDisplayMojo::Init(const user_manager::UserList& filtered_users, ...@@ -55,6 +57,11 @@ void LoginDisplayMojo::Init(const user_manager::UserList& filtered_users,
chromeos::DBusThreadManager::Get() chromeos::DBusThreadManager::Get()
->GetSessionManagerClient() ->GetSessionManagerClient()
->EmitLoginPromptVisible(); ->EmitLoginPromptVisible();
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
content::NotificationService::AllSources(),
content::NotificationService::NoDetails());
})); }));
user_selection_screen_->Init(filtered_users); user_selection_screen_->Init(filtered_users);
......
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