| 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/audio/sounds.h" | 9 #include "ash/audio/sounds.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "base/values.h" | 22 #include "base/values.h" |
| 23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
| 24 #include "chrome/browser/browser_shutdown.h" | 24 #include "chrome/browser/browser_shutdown.h" |
| 25 #include "chrome/browser/chrome_notification_types.h" | 25 #include "chrome/browser/chrome_notification_types.h" |
| 26 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 26 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 27 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 27 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 28 #include "chrome/browser/chromeos/base/locale_util.h" | 28 #include "chrome/browser/chromeos/base/locale_util.h" |
| 29 #include "chrome/browser/chromeos/boot_times_loader.h" | 29 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 30 #include "chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h" | 30 #include "chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h" |
| 31 #include "chrome/browser/chromeos/customization_document.h" | 31 #include "chrome/browser/chromeos/customization_document.h" |
| 32 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" | |
| 33 #include "chrome/browser/chromeos/first_run/first_run.h" | 32 #include "chrome/browser/chromeos/first_run/first_run.h" |
| 34 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 33 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 35 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 34 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 36 #include "chrome/browser/chromeos/language_preferences.h" | 35 #include "chrome/browser/chromeos/language_preferences.h" |
| 37 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 36 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 38 #include "chrome/browser/chromeos/login/helper.h" | 37 #include "chrome/browser/chromeos/login/helper.h" |
| 39 #include "chrome/browser/chromeos/login/input_events_blocker.h" | 38 #include "chrome/browser/chromeos/login/input_events_blocker.h" |
| 40 #include "chrome/browser/chromeos/login/keyboard_driven_oobe_key_handler.h" | 39 #include "chrome/browser/chromeos/login/keyboard_driven_oobe_key_handler.h" |
| 41 #include "chrome/browser/chromeos/login/login_utils.h" | 40 #include "chrome/browser/chromeos/login/login_utils.h" |
| 42 #include "chrome/browser/chromeos/login/login_wizard.h" | 41 #include "chrome/browser/chromeos/login/login_wizard.h" |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); | 363 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); |
| 365 CrasAudioHandler::Get()->RemoveAudioObserver(this); | 364 CrasAudioHandler::Get()->RemoveAudioObserver(this); |
| 366 | 365 |
| 367 views::FocusManager::set_arrow_key_traversal_enabled(false); | 366 views::FocusManager::set_arrow_key_traversal_enabled(false); |
| 368 ResetLoginWindowAndView(); | 367 ResetLoginWindowAndView(); |
| 369 | 368 |
| 370 // Let chrome process exit after login/oobe screen if needed. | 369 // Let chrome process exit after login/oobe screen if needed. |
| 371 chrome::EndKeepAlive(); | 370 chrome::EndKeepAlive(); |
| 372 | 371 |
| 373 default_host_ = NULL; | 372 default_host_ = NULL; |
| 374 // TODO(tengs): This should be refactored. See crbug.com/314934. | |
| 375 if (UserManager::Get()->IsCurrentUserNew()) { | |
| 376 // DriveOptInController will delete itself when finished. | |
| 377 (new DriveFirstRunController( | |
| 378 ProfileManager::GetActiveUserProfile()))->EnableOfflineMode(); | |
| 379 } | |
| 380 } | 373 } |
| 381 | 374 |
| 382 //////////////////////////////////////////////////////////////////////////////// | 375 //////////////////////////////////////////////////////////////////////////////// |
| 383 // LoginDisplayHostImpl, LoginDisplayHost implementation: | 376 // LoginDisplayHostImpl, LoginDisplayHost implementation: |
| 384 | 377 |
| 385 LoginDisplay* LoginDisplayHostImpl::CreateLoginDisplay( | 378 LoginDisplay* LoginDisplayHostImpl::CreateLoginDisplay( |
| 386 LoginDisplay::Delegate* delegate) { | 379 LoginDisplay::Delegate* delegate) { |
| 387 webui_login_display_ = new WebUILoginDisplay(delegate); | 380 webui_login_display_ = new WebUILoginDisplay(delegate); |
| 388 webui_login_display_->set_background_bounds(background_bounds()); | 381 webui_login_display_->set_background_bounds(background_bounds()); |
| 389 return webui_login_display_; | 382 return webui_login_display_; |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1188 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1196 new locale_util::SwitchLanguageCallback( | 1189 new locale_util::SwitchLanguageCallback( |
| 1197 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1190 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1198 | 1191 |
| 1199 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1192 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1200 locale_util::SwitchLanguage( | 1193 locale_util::SwitchLanguage( |
| 1201 locale, true, true /* login_layouts_only */, callback.Pass()); | 1194 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1202 } | 1195 } |
| 1203 | 1196 |
| 1204 } // namespace chromeos | 1197 } // namespace chromeos |
| OLD | NEW |