| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 webui_login_->dom_contents()->tab_contents()-> | 399 webui_login_->dom_contents()->tab_contents()-> |
| 400 FocusThroughTabTraversal(reverse); | 400 FocusThroughTabTraversal(reverse); |
| 401 GetWidget()->Activate(); | 401 GetWidget()->Activate(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 void WebUILoginView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 404 void WebUILoginView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
| 405 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 405 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
| 406 GetFocusManager()); | 406 GetFocusManager()); |
| 407 | 407 |
| 408 // Make sure error bubble is cleared on keyboard event. This is needed | 408 // Make sure error bubble is cleared on keyboard event. This is needed |
| 409 // when the focus is inside an iframe. | 409 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding |
| 410 WebUI* web_ui = GetWebUI(); | 410 // an immediate authentication error (See crbug.com/103643). |
| 411 if (web_ui) | 411 if (event.type == WebKit::WebInputEvent::KeyDown) { |
| 412 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 412 WebUI* web_ui = GetWebUI(); |
| 413 if (web_ui) |
| 414 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
| 415 } |
| 413 } | 416 } |
| 414 | 417 |
| 415 } // namespace chromeos | 418 } // namespace chromeos |
| OLD | NEW |