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