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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // accelerator when this view has focus. | 352 // accelerator when this view has focus. |
353 ScopedArrowKeyTraversal arrow_key_traversal(false); | 353 ScopedArrowKeyTraversal arrow_key_traversal(false); |
354 | 354 |
355 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 355 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
356 GetFocusManager()); | 356 GetFocusManager()); |
357 } | 357 } |
358 | 358 |
359 // Make sure error bubble is cleared on keyboard event. This is needed | 359 // Make sure error bubble is cleared on keyboard event. This is needed |
360 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding | 360 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding |
361 // an immediate authentication error (See crbug.com/103643). | 361 // an immediate authentication error (See crbug.com/103643). |
362 if (event.type == WebKit::WebInputEvent::KeyDown) { | 362 if (event.type == blink::WebInputEvent::KeyDown) { |
363 content::WebUI* web_ui = GetWebUI(); | 363 content::WebUI* web_ui = GetWebUI(); |
364 if (web_ui) | 364 if (web_ui) |
365 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 365 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { | 369 bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const { |
370 return true; | 370 return true; |
371 } | 371 } |
372 | 372 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 webui_visible_ = true; | 427 webui_visible_ = true; |
428 } | 428 } |
429 | 429 |
430 void WebUILoginView::ReturnFocus(bool reverse) { | 430 void WebUILoginView::ReturnFocus(bool reverse) { |
431 // Return the focus to the web contents. | 431 // Return the focus to the web contents. |
432 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 432 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
433 GetWidget()->Activate(); | 433 GetWidget()->Activate(); |
434 } | 434 } |
435 | 435 |
436 } // namespace chromeos | 436 } // namespace chromeos |
OLD | NEW |