| 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/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/desktop_background/desktop_background_controller.h" | 9 #include "ash/desktop_background/desktop_background_controller.h" |
| 10 #include "ash/desktop_background/user_wallpaper_delegate.h" | 10 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 DISALLOW_COPY_AND_ASSIGN(AnimationObserver); | 175 DISALLOW_COPY_AND_ASSIGN(AnimationObserver); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 // ShowLoginWizard is split into two parts. This function is sometimes called | 178 // ShowLoginWizard is split into two parts. This function is sometimes called |
| 179 // from ShowLoginWizard(), and sometimes from OnLanguageSwitchedCallback() | 179 // from ShowLoginWizard(), and sometimes from OnLanguageSwitchedCallback() |
| 180 // (if locale was updated). | 180 // (if locale was updated). |
| 181 void ShowLoginWizardFinish( | 181 void ShowLoginWizardFinish( |
| 182 const std::string& first_screen_name, | 182 const std::string& first_screen_name, |
| 183 const chromeos::StartupCustomizationDocument* startup_manifest, | 183 const chromeos::StartupCustomizationDocument* startup_manifest, |
| 184 chromeos::LoginDisplayHost* display_host) { | 184 chromeos::LoginDisplayHost* display_host) { |
| 185 scoped_ptr<DictionaryValue> params; | 185 scoped_ptr<base::DictionaryValue> params; |
| 186 display_host->StartWizard(first_screen_name, params.Pass()); | 186 display_host->StartWizard(first_screen_name, params.Pass()); |
| 187 | 187 |
| 188 chromeos::DBusThreadManager::Get()-> | 188 chromeos::DBusThreadManager::Get()-> |
| 189 GetSessionManagerClient()-> | 189 GetSessionManagerClient()-> |
| 190 EmitLoginPromptReady(); | 190 EmitLoginPromptReady(); |
| 191 TRACE_EVENT0("chromeos", "ShowLoginWizard::EmitLoginPromptReady"); | 191 TRACE_EVENT0("chromeos", "ShowLoginWizard::EmitLoginPromptReady"); |
| 192 | 192 |
| 193 // Set initial timezone if specified by customization. | 193 // Set initial timezone if specified by customization. |
| 194 const std::string timezone_name = startup_manifest->initial_timezone(); | 194 const std::string timezone_name = startup_manifest->initial_timezone(); |
| 195 VLOG(1) << "Initial time zone: " << timezone_name; | 195 VLOG(1) << "Initial time zone: " << timezone_name; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 callback.Run(auto_enrollment_client_ && | 479 callback.Run(auto_enrollment_client_ && |
| 480 auto_enrollment_client_->should_auto_enroll()); | 480 auto_enrollment_client_->should_auto_enroll()); |
| 481 return; | 481 return; |
| 482 } | 482 } |
| 483 | 483 |
| 484 get_auto_enrollment_result_callbacks_.push_back(callback); | 484 get_auto_enrollment_result_callbacks_.push_back(callback); |
| 485 } | 485 } |
| 486 | 486 |
| 487 void LoginDisplayHostImpl::StartWizard( | 487 void LoginDisplayHostImpl::StartWizard( |
| 488 const std::string& first_screen_name, | 488 const std::string& first_screen_name, |
| 489 scoped_ptr<DictionaryValue> screen_parameters) { | 489 scoped_ptr<base::DictionaryValue> screen_parameters) { |
| 490 startup_sound_honors_spoken_feedback_ = false; | 490 startup_sound_honors_spoken_feedback_ = false; |
| 491 TryToPlayStartupSound(); | 491 TryToPlayStartupSound(); |
| 492 | 492 |
| 493 // Keep parameters to restore if renderer crashes. | 493 // Keep parameters to restore if renderer crashes. |
| 494 restore_path_ = RESTORE_WIZARD; | 494 restore_path_ = RESTORE_WIZARD; |
| 495 wizard_first_screen_name_ = first_screen_name; | 495 wizard_first_screen_name_ = first_screen_name; |
| 496 if (screen_parameters.get()) | 496 if (screen_parameters.get()) |
| 497 wizard_screen_parameters_.reset(screen_parameters->DeepCopy()); | 497 wizard_screen_parameters_.reset(screen_parameters->DeepCopy()); |
| 498 else | 498 else |
| 499 wizard_screen_parameters_.reset(); | 499 wizard_screen_parameters_.reset(); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 display_host->StartAppLaunch(auto_launch_app_id); | 1116 display_host->StartAppLaunch(auto_launch_app_id); |
| 1117 return; | 1117 return; |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 bool should_show_enrollment_screen = | 1120 bool should_show_enrollment_screen = |
| 1121 first_screen_name.empty() && oobe_complete && | 1121 first_screen_name.empty() && oobe_complete && |
| 1122 chromeos::WizardController::ShouldAutoStartEnrollment() && | 1122 chromeos::WizardController::ShouldAutoStartEnrollment() && |
| 1123 !g_browser_process->browser_policy_connector()->IsEnterpriseManaged(); | 1123 !g_browser_process->browser_policy_connector()->IsEnterpriseManaged(); |
| 1124 if (should_show_enrollment_screen) { | 1124 if (should_show_enrollment_screen) { |
| 1125 display_host->StartWizard(chromeos::WizardController::kEnrollmentScreenName, | 1125 display_host->StartWizard(chromeos::WizardController::kEnrollmentScreenName, |
| 1126 scoped_ptr<DictionaryValue>()); | 1126 scoped_ptr<base::DictionaryValue>()); |
| 1127 return; | 1127 return; |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 bool show_login_screen = | 1130 bool show_login_screen = |
| 1131 (first_screen_name.empty() && oobe_complete) || | 1131 (first_screen_name.empty() && oobe_complete) || |
| 1132 first_screen_name == chromeos::WizardController::kLoginScreenName; | 1132 first_screen_name == chromeos::WizardController::kLoginScreenName; |
| 1133 | 1133 |
| 1134 if (show_login_screen) { | 1134 if (show_login_screen) { |
| 1135 // R11 > R12 migration fix. See http://crosbug.com/p/4898. | 1135 // R11 > R12 migration fix. See http://crosbug.com/p/4898. |
| 1136 // If user has manually changed locale during R11 OOBE, locale will be set. | 1136 // If user has manually changed locale during R11 OOBE, locale will be set. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 | 1195 |
| 1196 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1196 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1197 new locale_util::SwitchLanguageCallback( | 1197 new locale_util::SwitchLanguageCallback( |
| 1198 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1198 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1199 | 1199 |
| 1200 // Do not load locale keyboards here. | 1200 // Do not load locale keyboards here. |
| 1201 locale_util::SwitchLanguage(locale, false, callback.Pass()); | 1201 locale_util::SwitchLanguage(locale, false, callback.Pass()); |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 } // namespace chromeos | 1204 } // namespace chromeos |
| OLD | NEW |