| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 302 } |
| 303 | 303 |
| 304 void WebUILoginView::OnPostponedShow() { | 304 void WebUILoginView::OnPostponedShow() { |
| 305 set_is_hidden(false); | 305 set_is_hidden(false); |
| 306 OnLoginPromptVisible(); | 306 OnLoginPromptVisible(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void WebUILoginView::SetStatusAreaVisible(bool visible) { | 309 void WebUILoginView::SetStatusAreaVisible(bool visible) { |
| 310 if (ash::Shell::GetInstance()->HasPrimaryStatusArea()) { | 310 if (ash::Shell::GetInstance()->HasPrimaryStatusArea()) { |
| 311 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); | 311 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); |
| 312 tray->SetVisible(visible); |
| 312 if (visible) { | 313 if (visible) { |
| 313 // Tray may have been initialized being hidden. | 314 // Tray may have been initialized being hidden. |
| 314 tray->SetVisible(visible); | |
| 315 tray->GetWidget()->Show(); | 315 tray->GetWidget()->Show(); |
| 316 } else { | 316 } else { |
| 317 tray->GetWidget()->Hide(); | 317 tray->GetWidget()->Hide(); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 void WebUILoginView::SetUIEnabled(bool enabled) { | 322 void WebUILoginView::SetUIEnabled(bool enabled) { |
| 323 forward_keyboard_event_ = enabled; | 323 forward_keyboard_event_ = enabled; |
| 324 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); | 324 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 if (should_emit_login_prompt_visible_) { | 466 if (should_emit_login_prompt_visible_) { |
| 467 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 467 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 468 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 468 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 469 EmitLoginPromptVisible(); | 469 EmitLoginPromptVisible(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 webui_visible_ = true; | 472 webui_visible_ = true; |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace chromeos | 475 } // namespace chromeos |
| OLD | NEW |