| 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/terms_of_service_screen_handler
.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 ->GetProfileByUserUnsafe(UserManager::Get()->GetActiveUser()) | 154 ->GetProfileByUserUnsafe(UserManager::Get()->GetActiveUser()) |
| 155 ->GetPrefs() | 155 ->GetPrefs() |
| 156 ->GetString(prefs::kLanguagePreloadEngines), | 156 ->GetString(prefs::kLanguagePreloadEngines), |
| 157 ',', | 157 ',', |
| 158 &input_methods); | 158 &input_methods); |
| 159 | 159 |
| 160 if (!input_methods.empty()) { | 160 if (!input_methods.empty()) { |
| 161 // If the user has a preferred input method, enable it and switch to it. | 161 // If the user has a preferred input method, enable it and switch to it. |
| 162 chromeos::input_method::InputMethodManager* input_method_manager = | 162 chromeos::input_method::InputMethodManager* input_method_manager = |
| 163 chromeos::input_method::InputMethodManager::Get(); | 163 chromeos::input_method::InputMethodManager::Get(); |
| 164 input_method_manager->EnableInputMethod(input_methods.front()); | 164 input_method_manager->GetActiveIMEState()->EnableInputMethod( |
| 165 input_method_manager->ChangeInputMethod(input_methods.front()); | 165 input_methods.front()); |
| 166 input_method_manager->GetActiveIMEState()->ChangeInputMethod( |
| 167 input_methods.front(), false /* show_message */); |
| 166 } | 168 } |
| 167 | 169 |
| 168 // Updates the domain name shown in the UI. | 170 // Updates the domain name shown in the UI. |
| 169 UpdateDomainInUI(); | 171 UpdateDomainInUI(); |
| 170 | 172 |
| 171 // Update the UI to show an error message or the Terms of Service. | 173 // Update the UI to show an error message or the Terms of Service. |
| 172 UpdateTermsOfServiceInUI(); | 174 UpdateTermsOfServiceInUI(); |
| 173 | 175 |
| 174 ShowScreen(OobeUI::kScreenTermsOfService, NULL); | 176 ShowScreen(OobeUI::kScreenTermsOfService, NULL); |
| 175 } | 177 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 206 // and continue" button should not be accessible. If the user managed to | 208 // and continue" button should not be accessible. If the user managed to |
| 207 // activate it somehow anway, do not treat this as acceptance of the Terms | 209 // activate it somehow anway, do not treat this as acceptance of the Terms |
| 208 // and Conditions and end the session instead, as if the user had declined. | 210 // and Conditions and end the session instead, as if the user had declined. |
| 209 if (terms_of_service_.empty()) | 211 if (terms_of_service_.empty()) |
| 210 screen_->OnDecline(); | 212 screen_->OnDecline(); |
| 211 else | 213 else |
| 212 screen_->OnAccept(); | 214 screen_->OnAccept(); |
| 213 } | 215 } |
| 214 | 216 |
| 215 } // namespace chromeos | 217 } // namespace chromeos |
| OLD | NEW |