| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" | 48 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" |
| 49 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" | 49 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" |
| 50 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 50 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 51 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 51 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 52 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
| 53 #include "chrome/common/pref_names.h" | 53 #include "chrome/common/pref_names.h" |
| 54 #include "chrome/common/url_constants.h" | 54 #include "chrome/common/url_constants.h" |
| 55 #include "chromeos/chromeos_switches.h" | 55 #include "chromeos/chromeos_switches.h" |
| 56 #include "chromeos/dbus/dbus_thread_manager.h" | 56 #include "chromeos/dbus/dbus_thread_manager.h" |
| 57 #include "chromeos/dbus/power_manager_client.h" | 57 #include "chromeos/dbus/power_manager_client.h" |
| 58 #include "chromeos/ime/ime_keyboard.h" |
| 58 #include "chromeos/ime/input_method_manager.h" | 59 #include "chromeos/ime/input_method_manager.h" |
| 59 #include "chromeos/ime/xkeyboard.h" | |
| 60 #include "chromeos/network/network_state.h" | 60 #include "chromeos/network/network_state.h" |
| 61 #include "chromeos/network/network_state_handler.h" | 61 #include "chromeos/network/network_state_handler.h" |
| 62 #include "content/public/browser/browser_thread.h" | 62 #include "content/public/browser/browser_thread.h" |
| 63 #include "content/public/browser/render_frame_host.h" | 63 #include "content/public/browser/render_frame_host.h" |
| 64 #include "content/public/browser/web_contents.h" | 64 #include "content/public/browser/web_contents.h" |
| 65 #include "google_apis/gaia/gaia_auth_util.h" | 65 #include "google_apis/gaia/gaia_auth_util.h" |
| 66 #include "grit/chromium_strings.h" | 66 #include "grit/chromium_strings.h" |
| 67 #include "grit/generated_resources.h" | 67 #include "grit/generated_resources.h" |
| 68 #include "net/url_request/url_request_context_getter.h" | 68 #include "net/url_request/url_request_context_getter.h" |
| 69 #include "third_party/cros_system_api/dbus/service_constants.h" | 69 #include "third_party/cros_system_api/dbus/service_constants.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 494 |
| 495 if (oobe_ui_) { | 495 if (oobe_ui_) { |
| 496 // Shows new user sign-in for OOBE. | 496 // Shows new user sign-in for OOBE. |
| 497 OnShowAddUser(email_); | 497 OnShowAddUser(email_); |
| 498 } else { | 498 } else { |
| 499 // Populates account picker. Animation is turned off for now until we | 499 // Populates account picker. Animation is turned off for now until we |
| 500 // figure out how to make it fast enough. | 500 // figure out how to make it fast enough. |
| 501 SendUserList(false); | 501 SendUserList(false); |
| 502 | 502 |
| 503 // Reset Caps Lock state when login screen is shown. | 503 // Reset Caps Lock state when login screen is shown. |
| 504 input_method::InputMethodManager::Get()->GetXKeyboard()-> | 504 input_method::InputMethodManager::Get() |
| 505 SetCapsLockEnabled(false); | 505 ->GetImeKeyboard() |
| 506 ->SetCapsLockEnabled(false); |
| 506 | 507 |
| 507 base::DictionaryValue params; | 508 base::DictionaryValue params; |
| 508 params.SetBoolean("disableAddUser", AllWhitelistedUsersPresent()); | 509 params.SetBoolean("disableAddUser", AllWhitelistedUsersPresent()); |
| 509 UpdateUIState(UI_STATE_ACCOUNT_PICKER, ¶ms); | 510 UpdateUIState(UI_STATE_ACCOUNT_PICKER, ¶ms); |
| 510 } | 511 } |
| 511 } | 512 } |
| 512 | 513 |
| 513 void SigninScreenHandler::UpdateUIState(UIState ui_state, | 514 void SigninScreenHandler::UpdateUIState(UIState ui_state, |
| 514 base::DictionaryValue* params) { | 515 base::DictionaryValue* params) { |
| 515 switch (ui_state) { | 516 switch (ui_state) { |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 DCHECK(gaia_screen_handler_); | 1792 DCHECK(gaia_screen_handler_); |
| 1792 return gaia_screen_handler_->frame_state(); | 1793 return gaia_screen_handler_->frame_state(); |
| 1793 } | 1794 } |
| 1794 | 1795 |
| 1795 net::Error SigninScreenHandler::FrameError() const { | 1796 net::Error SigninScreenHandler::FrameError() const { |
| 1796 DCHECK(gaia_screen_handler_); | 1797 DCHECK(gaia_screen_handler_); |
| 1797 return gaia_screen_handler_->frame_error(); | 1798 return gaia_screen_handler_->frame_error(); |
| 1798 } | 1799 } |
| 1799 | 1800 |
| 1800 } // namespace chromeos | 1801 } // namespace chromeos |
| OLD | NEW |