| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/browser_shutdown.h" |
| 12 #include "chrome/browser/chromeos/cros/cros_library.h" | 13 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 13 #include "chrome/browser/chromeos/cros/login_library.h" | 14 #include "chrome/browser/chromeos/cros/login_library.h" |
| 14 #include "chrome/browser/chromeos/customization_document.h" | 15 #include "chrome/browser/chromeos/customization_document.h" |
| 15 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 16 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 16 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 17 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 17 #include "chrome/browser/chromeos/language_preferences.h" | 18 #include "chrome/browser/chromeos/language_preferences.h" |
| 18 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 19 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 19 #include "chrome/browser/chromeos/login/helper.h" | 20 #include "chrome/browser/chromeos/login/helper.h" |
| 20 #include "chrome/browser/chromeos/login/language_switch_menu.h" | 21 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
| 21 #include "chrome/browser/chromeos/login/login_utils.h" | 22 #include "chrome/browser/chromeos/login/login_utils.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } // namespace chromeos | 213 } // namespace chromeos |
| 213 | 214 |
| 214 // browser::ShowLoginWizard implementation ------------------------------------- | 215 // browser::ShowLoginWizard implementation ------------------------------------- |
| 215 | 216 |
| 216 namespace browser { | 217 namespace browser { |
| 217 | 218 |
| 218 // Declared in browser_dialogs.h so that others don't need to depend on our .h. | 219 // Declared in browser_dialogs.h so that others don't need to depend on our .h. |
| 219 // TODO(nkostylev): Split this into a smaller functions. | 220 // TODO(nkostylev): Split this into a smaller functions. |
| 220 void ShowLoginWizard(const std::string& first_screen_name, | 221 void ShowLoginWizard(const std::string& first_screen_name, |
| 221 const gfx::Size& size) { | 222 const gfx::Size& size) { |
| 223 if (browser_shutdown::IsTryingToQuit()) |
| 224 return; |
| 225 |
| 222 VLOG(1) << "Showing OOBE screen: " << first_screen_name; | 226 VLOG(1) << "Showing OOBE screen: " << first_screen_name; |
| 223 | 227 |
| 224 // The login screen will enable alternate keyboard layouts, but we don't want | 228 // The login screen will enable alternate keyboard layouts, but we don't want |
| 225 // to start the IME process unless one is selected. | 229 // to start the IME process unless one is selected. |
| 226 chromeos::input_method::InputMethodManager::GetInstance()-> | 230 chromeos::input_method::InputMethodManager::GetInstance()-> |
| 227 SetDeferImeStartup(true); | 231 SetDeferImeStartup(true); |
| 228 // Tell the window manager that the user isn't logged in. | 232 // Tell the window manager that the user isn't logged in. |
| 229 chromeos::WmIpc::instance()->SetLoggedInProperty(false); | 233 chromeos::WmIpc::instance()->SetLoggedInProperty(false); |
| 230 | 234 |
| 231 // Set up keyboards. For example, when |locale| is "en-US", enable US qwerty | 235 // Set up keyboards. For example, when |locale| is "en-US", enable US qwerty |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 // user has changed to during OOBE. | 346 // user has changed to during OOBE. |
| 343 if (!timezone_name.empty()) { | 347 if (!timezone_name.empty()) { |
| 344 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 348 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 345 icu::UnicodeString::fromUTF8(timezone_name)); | 349 icu::UnicodeString::fromUTF8(timezone_name)); |
| 346 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 350 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 347 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 351 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 348 } | 352 } |
| 349 } | 353 } |
| 350 | 354 |
| 351 } // namespace browser | 355 } // namespace browser |
| OLD | NEW |