| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/ui/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "chrome/browser/chromeos/mobile_config.h" | 48 #include "chrome/browser/chromeos/mobile_config.h" |
| 49 #include "chrome/browser/chromeos/net/delay_network_call.h" | 49 #include "chrome/browser/chromeos/net/delay_network_call.h" |
| 50 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 50 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 51 #include "chrome/browser/chromeos/policy/enrollment_config.h" | 51 #include "chrome/browser/chromeos/policy/enrollment_config.h" |
| 52 #include "chrome/browser/chromeos/settings/cros_settings.h" | 52 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 53 #include "chrome/browser/chromeos/system/device_disabling_manager.h" | 53 #include "chrome/browser/chromeos/system/device_disabling_manager.h" |
| 54 #include "chrome/browser/chromeos/system/input_device_settings.h" | 54 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 55 #include "chrome/browser/chromeos/system/timezone_util.h" | 55 #include "chrome/browser/chromeos/system/timezone_util.h" |
| 56 #include "chrome/browser/chromeos/ui/focus_ring_controller.h" | 56 #include "chrome/browser/chromeos/ui/focus_ring_controller.h" |
| 57 #include "chrome/browser/lifetime/application_lifetime.h" | 57 #include "chrome/browser/lifetime/application_lifetime.h" |
| 58 #include "chrome/browser/lifetime/browser_keep_alive.h" |
| 58 #include "chrome/browser/profiles/profile_manager.h" | 59 #include "chrome/browser/profiles/profile_manager.h" |
| 59 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 60 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 60 #include "chrome/common/chrome_constants.h" | 61 #include "chrome/common/chrome_constants.h" |
| 61 #include "chrome/common/chrome_switches.h" | 62 #include "chrome/common/chrome_switches.h" |
| 62 #include "chrome/common/pref_names.h" | 63 #include "chrome/common/pref_names.h" |
| 63 #include "chrome/grit/browser_resources.h" | 64 #include "chrome/grit/browser_resources.h" |
| 64 #include "chromeos/audio/chromeos_sounds.h" | 65 #include "chromeos/audio/chromeos_sounds.h" |
| 65 #include "chromeos/chromeos_constants.h" | 66 #include "chromeos/chromeos_constants.h" |
| 66 #include "chromeos/chromeos_switches.h" | 67 #include "chromeos/chromeos_switches.h" |
| 67 #include "chromeos/dbus/dbus_thread_manager.h" | 68 #include "chromeos/dbus/dbus_thread_manager.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 301 |
| 301 // Login screen is moved to lock screen container when user logs in. | 302 // Login screen is moved to lock screen container when user logs in. |
| 302 registrar_.Add(this, | 303 registrar_.Add(this, |
| 303 chrome::NOTIFICATION_LOGIN_USER_CHANGED, | 304 chrome::NOTIFICATION_LOGIN_USER_CHANGED, |
| 304 content::NotificationService::AllSources()); | 305 content::NotificationService::AllSources()); |
| 305 | 306 |
| 306 DCHECK(default_host_ == NULL); | 307 DCHECK(default_host_ == NULL); |
| 307 default_host_ = this; | 308 default_host_ = this; |
| 308 | 309 |
| 309 // Make sure chrome won't exit while we are at login/oobe screen. | 310 // Make sure chrome won't exit while we are at login/oobe screen. |
| 310 chrome::IncrementKeepAliveCount(); | 311 browser_lifetime::IncrementKeepAliveCount(); |
| 311 | 312 |
| 312 bool is_registered = StartupUtils::IsDeviceRegistered(); | 313 bool is_registered = StartupUtils::IsDeviceRegistered(); |
| 313 bool zero_delay_enabled = WizardController::IsZeroDelayEnabled(); | 314 bool zero_delay_enabled = WizardController::IsZeroDelayEnabled(); |
| 314 bool disable_boot_animation = | 315 bool disable_boot_animation = |
| 315 base::CommandLine::ForCurrentProcess()->HasSwitch( | 316 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 316 switches::kDisableBootAnimation); | 317 switches::kDisableBootAnimation); |
| 317 | 318 |
| 318 waiting_for_wallpaper_load_ = !zero_delay_enabled && | 319 waiting_for_wallpaper_load_ = !zero_delay_enabled && |
| 319 (!is_registered || !disable_boot_animation); | 320 (!is_registered || !disable_boot_animation); |
| 320 | 321 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 391 |
| 391 if (login_view_ && login_window_) | 392 if (login_view_ && login_window_) |
| 392 login_window_->RemoveRemovalsObserver(this); | 393 login_window_->RemoveRemovalsObserver(this); |
| 393 | 394 |
| 394 ResetKeyboardOverscrollOverride(); | 395 ResetKeyboardOverscrollOverride(); |
| 395 | 396 |
| 396 views::FocusManager::set_arrow_key_traversal_enabled(false); | 397 views::FocusManager::set_arrow_key_traversal_enabled(false); |
| 397 ResetLoginWindowAndView(); | 398 ResetLoginWindowAndView(); |
| 398 | 399 |
| 399 // Let chrome process exit after login/oobe screen if needed. | 400 // Let chrome process exit after login/oobe screen if needed. |
| 400 chrome::DecrementKeepAliveCount(); | 401 browser_lifetime::DecrementKeepAliveCount(); |
| 401 | 402 |
| 402 default_host_ = NULL; | 403 default_host_ = NULL; |
| 403 // TODO(tengs): This should be refactored. See crbug.com/314934. | 404 // TODO(tengs): This should be refactored. See crbug.com/314934. |
| 404 if (user_manager::UserManager::Get()->IsCurrentUserNew()) { | 405 if (user_manager::UserManager::Get()->IsCurrentUserNew()) { |
| 405 // DriveOptInController will delete itself when finished. | 406 // DriveOptInController will delete itself when finished. |
| 406 (new DriveFirstRunController( | 407 (new DriveFirstRunController( |
| 407 ProfileManager::GetActiveUserProfile()))->EnableOfflineMode(); | 408 ProfileManager::GetActiveUserProfile()))->EnableOfflineMode(); |
| 408 } | 409 } |
| 409 } | 410 } |
| 410 | 411 |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 | 1257 |
| 1257 locale_util::SwitchLanguageCallback callback( | 1258 locale_util::SwitchLanguageCallback callback( |
| 1258 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); | 1259 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); |
| 1259 | 1260 |
| 1260 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1261 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1261 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, | 1262 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, |
| 1262 callback, ProfileManager::GetActiveUserProfile()); | 1263 callback, ProfileManager::GetActiveUserProfile()); |
| 1263 } | 1264 } |
| 1264 | 1265 |
| 1265 } // namespace chromeos | 1266 } // namespace chromeos |
| OLD | NEW |