Chromium Code Reviews| 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/common/focus_cycler.h" | 7 #include "ash/common/focus_cycler.h" |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 | 313 |
| 314 void WebUILoginView::OnPostponedShow() { | 314 void WebUILoginView::OnPostponedShow() { |
| 315 set_is_hidden(false); | 315 set_is_hidden(false); |
| 316 OnLoginPromptVisible(); | 316 OnLoginPromptVisible(); |
| 317 } | 317 } |
| 318 | 318 |
| 319 void WebUILoginView::SetStatusAreaVisible(bool visible) { | 319 void WebUILoginView::SetStatusAreaVisible(bool visible) { |
| 320 if (!chrome::IsRunningInMash() && | 320 if (!chrome::IsRunningInMash() && |
| 321 ash::Shell::GetInstance()->HasPrimaryStatusArea()) { | 321 ash::Shell::GetInstance()->HasPrimaryStatusArea()) { |
| 322 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); | 322 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); |
| 323 tray->SetVisible(visible); | |
| 324 tray->GetWidget()->SetOpacity(visible ? 1.0 : 0.0); | 323 tray->GetWidget()->SetOpacity(visible ? 1.0 : 0.0); |
|
jdufault
2016/07/07 23:26:50
I don't think this change should get reverted.
Qiang(Joe) Xu
2016/07/08 00:18:40
done. tks.
| |
| 325 if (visible) { | 324 if (visible) { |
| 326 // Tray may have been initialized being hidden. | 325 tray->SetVisible(visible); |
| 327 tray->GetWidget()->Show(); | 326 tray->GetWidget()->Show(); |
| 328 } else { | 327 } else { |
| 329 tray->GetWidget()->Hide(); | 328 tray->GetWidget()->Hide(); |
| 330 } | 329 } |
| 331 } else { | 330 } else { |
| 332 NOTIMPLEMENTED(); | 331 NOTIMPLEMENTED(); |
| 333 } | 332 } |
| 334 } | 333 } |
| 335 | 334 |
| 336 void WebUILoginView::SetUIEnabled(bool enabled) { | 335 void WebUILoginView::SetUIEnabled(bool enabled) { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 526 if (should_emit_login_prompt_visible_) { | 525 if (should_emit_login_prompt_visible_) { |
| 527 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 526 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 528 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 527 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 529 EmitLoginPromptVisible(); | 528 EmitLoginPromptVisible(); |
| 530 } | 529 } |
| 531 | 530 |
| 532 webui_visible_ = true; | 531 webui_visible_ = true; |
| 533 } | 532 } |
| 534 | 533 |
| 535 } // namespace chromeos | 534 } // namespace chromeos |
| OLD | NEW |