Commit 5e464fd2 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

cros login: Remove redundant code from webui_login_view

Bug: 753698
Change-Id: Iffc2dcf47b0635a737057755455225b008478c6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367035Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800480}
parent d61dc479
......@@ -387,19 +387,8 @@ bool WebUILoginView::TakeFocus(content::WebContents* source, bool reverse) {
if (!forward_keyboard_event_)
return false;
// For default tab order, after login UI, try focusing the system tray.
if (!reverse && MoveFocusToSystemTray(reverse))
return true;
// If initial MoveFocusToSystemTray was skipped due to lock screen app being
// a preferred option (due to traversal direction), try focusing system tray
// again.
if (reverse && MoveFocusToSystemTray(reverse))
return true;
// Since neither system tray nor a lock screen app window was focusable, the
// focus should stay in the login UI.
AboutToRequestFocusFromTabTraversal(reverse);
// FocusLoginShelf focuses either system tray or login shelf buttons.
ash::LoginScreen::Get()->FocusLoginShelf(reverse);
return true;
}
......@@ -432,11 +421,6 @@ void WebUILoginView::OnFocusLeavingSystemTray(bool reverse) {
AboutToRequestFocusFromTabTraversal(reverse);
}
bool WebUILoginView::MoveFocusToSystemTray(bool reverse) {
ash::LoginScreen::Get()->FocusLoginShelf(reverse);
return true;
}
void WebUILoginView::OnLoginPromptVisible() {
if (!observing_system_tray_focus_ && LoginScreenClient::HasInstance()) {
LoginScreenClient::Get()->AddSystemTrayFocusObserver(this);
......
......@@ -159,10 +159,6 @@ class WebUILoginView : public views::View,
// Overridden from ash::SystemTrayFocusObserver.
void OnFocusLeavingSystemTray(bool reverse) override;
// Attempts to move focus to system tray. Returns whether the attempt was
// successful (it might fail if the system tray is not visible).
bool MoveFocusToSystemTray(bool reverse);
// Performs series of actions when login prompt is considered
// to be ready and visible.
// 1. Emits LoginPromptVisible signal if needed
......
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