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/system/tray/system_tray.h" | 8 #include "ash/common/system/tray/system_tray.h" |
9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // we should not process focus change events. | 450 // we should not process focus change events. |
451 if (!forward_keyboard_event_) | 451 if (!forward_keyboard_event_) |
452 return false; | 452 return false; |
453 | 453 |
454 // Focus is accepted, but the Ash system tray is not available in Mash, so | 454 // Focus is accepted, but the Ash system tray is not available in Mash, so |
455 // exit early. | 455 // exit early. |
456 if (ash_util::IsRunningInMash()) | 456 if (ash_util::IsRunningInMash()) |
457 return true; | 457 return true; |
458 | 458 |
459 ash::SystemTray* tray = ash::Shell::Get()->GetPrimarySystemTray(); | 459 ash::SystemTray* tray = ash::Shell::Get()->GetPrimarySystemTray(); |
460 if (tray && tray->GetWidget()->IsVisible()) { | 460 if (tray && tray->GetWidget()->IsVisible() && tray->visible()) { |
461 tray->SetNextFocusableView(this); | 461 tray->SetNextFocusableView(this); |
462 ash::Shell::Get()->focus_cycler()->RotateFocus( | 462 ash::Shell::Get()->focus_cycler()->RotateFocus( |
463 reverse ? ash::FocusCycler::BACKWARD : ash::FocusCycler::FORWARD); | 463 reverse ? ash::FocusCycler::BACKWARD : ash::FocusCycler::FORWARD); |
| 464 } else { |
| 465 AboutToRequestFocusFromTabTraversal(reverse); |
464 } | 466 } |
465 | 467 |
466 return true; | 468 return true; |
467 } | 469 } |
468 | 470 |
469 void WebUILoginView::RequestMediaAccessPermission( | 471 void WebUILoginView::RequestMediaAccessPermission( |
470 WebContents* web_contents, | 472 WebContents* web_contents, |
471 const content::MediaStreamRequest& request, | 473 const content::MediaStreamRequest& request, |
472 const content::MediaResponseCallback& callback) { | 474 const content::MediaResponseCallback& callback) { |
473 // Note: This is needed for taking photos when selecting new user images | 475 // Note: This is needed for taking photos when selecting new user images |
(...skipping 29 matching lines...) Expand all Loading... |
503 if (should_emit_login_prompt_visible_) { | 505 if (should_emit_login_prompt_visible_) { |
504 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 506 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
505 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 507 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
506 EmitLoginPromptVisible(); | 508 EmitLoginPromptVisible(); |
507 } | 509 } |
508 | 510 |
509 webui_visible_ = true; | 511 webui_visible_ = true; |
510 } | 512 } |
511 | 513 |
512 } // namespace chromeos | 514 } // namespace chromeos |
OLD | NEW |