| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/gaia_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/chromeos/settings/cros_settings.h" | 23 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 24 #include "chrome/browser/io_thread.h" | 24 #include "chrome/browser/io_thread.h" |
| 25 #include "chrome/browser/lifetime/application_lifetime.h" | 25 #include "chrome/browser/lifetime/application_lifetime.h" |
| 26 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 27 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 27 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
| 28 #include "chrome/common/chrome_version_info.h" | 28 #include "chrome/common/chrome_version_info.h" |
| 29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "chrome/grit/generated_resources.h" | 30 #include "chrome/grit/generated_resources.h" |
| 31 #include "chromeos/chromeos_switches.h" | 31 #include "chromeos/chromeos_switches.h" |
| 32 #include "chromeos/settings/cros_settings_names.h" | 32 #include "chromeos/settings/cros_settings_names.h" |
| 33 #include "components/login/localized_values_builder.h" |
| 33 #include "components/user_manager/user_manager.h" | 34 #include "components/user_manager/user_manager.h" |
| 34 #include "content/public/browser/browser_thread.h" | 35 #include "content/public/browser/browser_thread.h" |
| 35 #include "content/public/browser/render_frame_host.h" | 36 #include "content/public/browser/render_frame_host.h" |
| 36 #include "google_apis/gaia/gaia_auth_util.h" | 37 #include "google_apis/gaia/gaia_auth_util.h" |
| 37 #include "google_apis/gaia/gaia_switches.h" | 38 #include "google_apis/gaia/gaia_switches.h" |
| 38 #include "google_apis/gaia/gaia_urls.h" | 39 #include "google_apis/gaia/gaia_urls.h" |
| 39 #include "ui/base/ime/chromeos/input_method_manager.h" | 40 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 40 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
| 41 | 42 |
| 42 using content::BrowserThread; | 43 using content::BrowserThread; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 embedded_signin_enabled_by_shortcut_ = true; | 272 embedded_signin_enabled_by_shortcut_ = true; |
| 272 LoadAuthExtension( | 273 LoadAuthExtension( |
| 273 true /* force */, true /* silent_load */, false /* offline */); | 274 true /* force */, true /* silent_load */, false /* offline */); |
| 274 } | 275 } |
| 275 | 276 |
| 276 void GaiaScreenHandler::CancelEmbeddedSignin() { | 277 void GaiaScreenHandler::CancelEmbeddedSignin() { |
| 277 embedded_signin_enabled_by_shortcut_ = false; | 278 embedded_signin_enabled_by_shortcut_ = false; |
| 278 } | 279 } |
| 279 | 280 |
| 280 void GaiaScreenHandler::DeclareLocalizedValues( | 281 void GaiaScreenHandler::DeclareLocalizedValues( |
| 281 LocalizedValuesBuilder* builder) { | 282 ::login::LocalizedValuesBuilder* builder) { |
| 282 builder->Add("signinScreenTitle", IDS_SIGNIN_SCREEN_TITLE); | 283 builder->Add("signinScreenTitle", IDS_SIGNIN_SCREEN_TITLE); |
| 283 builder->Add("signinScreenPasswordChanged", | 284 builder->Add("signinScreenPasswordChanged", |
| 284 IDS_SIGNIN_SCREEN_PASSWORD_CHANGED); | 285 IDS_SIGNIN_SCREEN_PASSWORD_CHANGED); |
| 285 builder->Add("createAccount", IDS_CREATE_ACCOUNT_HTML); | 286 builder->Add("createAccount", IDS_CREATE_ACCOUNT_HTML); |
| 286 builder->Add("guestSignin", IDS_BROWSE_WITHOUT_SIGNING_IN_HTML); | 287 builder->Add("guestSignin", IDS_BROWSE_WITHOUT_SIGNING_IN_HTML); |
| 287 builder->Add("createSupervisedUser", | 288 builder->Add("createSupervisedUser", |
| 288 IDS_CREATE_SUPERVISED_USER_HTML); | 289 IDS_CREATE_SUPERVISED_USER_HTML); |
| 289 builder->Add("createSupervisedUserFeatureName", | 290 builder->Add("createSupervisedUserFeatureName", |
| 290 IDS_CREATE_SUPERVISED_USER_FEATURE_NAME); | 291 IDS_CREATE_SUPERVISED_USER_FEATURE_NAME); |
| 291 builder->Add("consumerManagementEnrollmentSigninMessage", | 292 builder->Add("consumerManagementEnrollmentSigninMessage", |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 | 757 |
| 757 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 758 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
| 758 DCHECK(signin_screen_handler_); | 759 DCHECK(signin_screen_handler_); |
| 759 return signin_screen_handler_->delegate_; | 760 return signin_screen_handler_->delegate_; |
| 760 } | 761 } |
| 761 | 762 |
| 762 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { | 763 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { |
| 763 signin_screen_handler_ = handler; | 764 signin_screen_handler_ = handler; |
| 764 } | 765 } |
| 765 } // namespace chromeos | 766 } // namespace chromeos |
| OLD | NEW |