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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 if (web_ui) | 313 if (web_ui) |
314 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 314 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
315 } | 315 } |
316 } | 316 } |
317 | 317 |
318 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { | 318 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { |
319 return true; | 319 return true; |
320 } | 320 } |
321 | 321 |
322 bool WebUILoginView::TakeFocus(bool reverse) { | 322 bool WebUILoginView::TakeFocus(bool reverse) { |
323 ash::SystemTray* tray = ash::Shell::GetInstance()->tray(); | |
324 if (tray) { | |
325 tray->TakeFocus(this); | |
326 } | |
sadrul
2012/04/19 16:12:35
From a quick try, it looks like doing the followin
Zachary Kuznia
2012/04/23 07:41:48
Done.
| |
323 return true; | 327 return true; |
324 } | 328 } |
325 | 329 |
326 void WebUILoginView::ReturnFocus(bool reverse) { | 330 void WebUILoginView::ReturnFocus(bool reverse) { |
327 // Return the focus to the web contents. | 331 // Return the focus to the web contents. |
328 webui_login_->dom_contents()->web_contents()-> | 332 webui_login_->dom_contents()->web_contents()-> |
329 FocusThroughTabTraversal(reverse); | 333 FocusThroughTabTraversal(reverse); |
330 GetWidget()->Activate(); | 334 GetWidget()->Activate(); |
331 } | 335 } |
332 | 336 |
333 } // namespace chromeos | 337 } // namespace chromeos |
OLD | NEW |