| Index: chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| diff --git a/chrome/browser/chromeos/login/ui/webui_login_view.cc b/chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| index 3cc07a5321bd0d417f86eee2aed56a3c4c6903ce..5afb639e8648e33bb94ba20563f81828d002d390 100644
|
| --- a/chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| +++ b/chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| @@ -37,6 +37,7 @@
|
| #include "chrome/browser/renderer_preferences_util.h"
|
| #include "chrome/browser/sessions/session_tab_helper.h"
|
| #include "chrome/browser/ui/ash/ash_util.h"
|
| +#include "chrome/browser/ui/ash/system_tray_client.h"
|
| #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
|
| #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| @@ -449,40 +450,13 @@ void WebUILoginView::OnPostponedShow() {
|
| }
|
|
|
| void WebUILoginView::SetStatusAreaVisible(bool visible) {
|
| - if (!chrome::IsRunningInMash() &&
|
| - ash::Shell::GetInstance()->HasPrimaryStatusArea()) {
|
| - ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
|
| - tray->SetVisible(visible);
|
| - tray->GetWidget()->SetOpacity(visible ? 1.0 : 0.0);
|
| - if (visible) {
|
| - tray->GetWidget()->Show();
|
| - } else {
|
| - tray->GetWidget()->Hide();
|
| - }
|
| - } else {
|
| - NOTIMPLEMENTED();
|
| - }
|
| + SystemTrayClient::Get()->SetPrimaryTrayVisible(visible);
|
| }
|
|
|
| void WebUILoginView::SetUIEnabled(bool enabled) {
|
| forward_keyboard_event_ = enabled;
|
| - if (chrome::IsRunningInMash()) {
|
| - NOTIMPLEMENTED();
|
| - return;
|
| - }
|
| - ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
|
|
|
| - // We disable the UI to prevent user from interracting with UI elements,
|
| - // particullary with the system tray menu. However, in case if the system tray
|
| - // bubble is opened at this point, it remains opened and interactive even
|
| - // after SystemTray::SetEnabled(false) call, which can be dangerous
|
| - // (http://crbug.com/497080). Close the menu to fix it. Calling
|
| - // SystemTray::SetEnabled(false) guarantees, that the menu will not be opened
|
| - // until the UI is enabled again.
|
| - if (!enabled && tray->HasSystemBubble())
|
| - tray->CloseSystemBubble();
|
| -
|
| - tray->SetEnabled(enabled);
|
| + SystemTrayClient::Get()->SetPrimaryTrayEnabled(enabled);
|
| }
|
|
|
| // WebUILoginView protected: ---------------------------------------------------
|
|
|