| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 if (web_ui) | 310 if (web_ui) |
| 311 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 311 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 | 314 |
| 315 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { | 315 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { |
| 316 return true; | 316 return true; |
| 317 } | 317 } |
| 318 | 318 |
| 319 bool WebUILoginView::TakeFocus(bool reverse) { | 319 bool WebUILoginView::TakeFocus(bool reverse) { |
| 320 ash::SystemTray* tray = ash::Shell::GetInstance()->tray(); |
| 321 if (tray) { |
| 322 tray->SetNextFocusableView(this); |
| 323 ash::Shell::GetInstance()->RotateFocus(reverse ? ash::Shell::BACKWARD : |
| 324 ash::Shell::FORWARD); |
| 325 } |
| 326 |
| 320 return true; | 327 return true; |
| 321 } | 328 } |
| 322 | 329 |
| 323 void WebUILoginView::ReturnFocus(bool reverse) { | 330 void WebUILoginView::ReturnFocus(bool reverse) { |
| 324 // Return the focus to the web contents. | 331 // Return the focus to the web contents. |
| 325 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 332 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
| 326 GetWidget()->Activate(); | 333 GetWidget()->Activate(); |
| 327 } | 334 } |
| 328 | 335 |
| 329 } // namespace chromeos | 336 } // namespace chromeos |
| OLD | NEW |