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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 26 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
27 #include "chrome/browser/chromeos/login/helper.h" | 27 #include "chrome/browser/chromeos/login/helper.h" |
28 #include "chrome/browser/chromeos/login/language_switch_menu.h" | 28 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
29 #include "chrome/browser/chromeos/login/login_utils.h" | 29 #include "chrome/browser/chromeos/login/login_utils.h" |
30 #include "chrome/browser/chromeos/login/login_wizard.h" | 30 #include "chrome/browser/chromeos/login/login_wizard.h" |
31 #include "chrome/browser/chromeos/login/user_manager.h" | 31 #include "chrome/browser/chromeos/login/user_manager.h" |
32 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | 32 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
33 #include "chrome/browser/chromeos/login/wizard_controller.h" | 33 #include "chrome/browser/chromeos/login/wizard_controller.h" |
34 #include "chrome/browser/chromeos/mobile_config.h" | 34 #include "chrome/browser/chromeos/mobile_config.h" |
35 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" | 35 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" |
36 #include "chrome/browser/chromeos/profiles/profile_helper.h" | |
Nikita (slow)
2013/04/12 16:03:17
nit: not used
dzhioev (left Google)
2013/04/15 07:20:03
Done.
| |
36 #include "chrome/browser/chromeos/system/input_device_settings.h" | 37 #include "chrome/browser/chromeos/system/input_device_settings.h" |
37 #include "chrome/browser/chromeos/system/timezone_settings.h" | 38 #include "chrome/browser/chromeos/system/timezone_settings.h" |
38 #include "chrome/browser/managed_mode/managed_mode.h" | 39 #include "chrome/browser/managed_mode/managed_mode.h" |
39 #include "chrome/browser/policy/browser_policy_connector.h" | 40 #include "chrome/browser/policy/browser_policy_connector.h" |
40 #include "chrome/common/chrome_notification_types.h" | 41 #include "chrome/common/chrome_notification_types.h" |
41 #include "chrome/common/chrome_switches.h" | 42 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/common/pref_names.h" | 43 #include "chrome/common/pref_names.h" |
43 #include "chromeos/dbus/dbus_thread_manager.h" | 44 #include "chromeos/dbus/dbus_thread_manager.h" |
44 #include "chromeos/dbus/session_manager_client.h" | 45 #include "chromeos/dbus/session_manager_client.h" |
45 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 | 161 |
161 //////////////////////////////////////////////////////////////////////////////// | 162 //////////////////////////////////////////////////////////////////////////////// |
162 // BaseLoginDisplayHost, LoginDisplayHost implementation: | 163 // BaseLoginDisplayHost, LoginDisplayHost implementation: |
163 | 164 |
164 void BaseLoginDisplayHost::BeforeSessionStart() { | 165 void BaseLoginDisplayHost::BeforeSessionStart() { |
165 session_starting_ = true; | 166 session_starting_ = true; |
166 } | 167 } |
167 | 168 |
168 void BaseLoginDisplayHost::OnSessionStart() { | 169 void BaseLoginDisplayHost::OnSessionStart() { |
169 DVLOG(1) << "Session starting"; | 170 DVLOG(1) << "Session starting"; |
170 if (chromeos::UserManager::Get()->IsCurrentUserNew()) { | 171 ash::Shell::GetInstance()-> |
171 ash::Shell::GetInstance()-> | 172 desktop_background_controller()->MoveDesktopToUnlockedContainer(); |
172 desktop_background_controller()->MoveDesktopToUnlockedContainer(); | |
173 } | |
174 if (wizard_controller_.get()) | 173 if (wizard_controller_.get()) |
175 wizard_controller_->OnSessionStart(); | 174 wizard_controller_->OnSessionStart(); |
176 // Display host is deleted once animation is completed | 175 // Display host is deleted once animation is completed |
177 // since sign in screen widget has to stay alive. | 176 // since sign in screen widget has to stay alive. |
178 StartAnimation(); | 177 StartAnimation(); |
179 ShutdownDisplayHost(false); | 178 ShutdownDisplayHost(false); |
180 } | 179 } |
181 | 180 |
182 void BaseLoginDisplayHost::OnCompleteLogin() { | 181 void BaseLoginDisplayHost::OnCompleteLogin() { |
183 // Cancelling the |auto_enrollment_client_| now allows it to determine whether | 182 // Cancelling the |auto_enrollment_client_| now allows it to determine whether |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
508 VLOG(1) << "Initial time zone: " << timezone_name; | 507 VLOG(1) << "Initial time zone: " << timezone_name; |
509 // Apply locale customizations only once to preserve whatever locale | 508 // Apply locale customizations only once to preserve whatever locale |
510 // user has changed to during OOBE. | 509 // user has changed to during OOBE. |
511 if (!timezone_name.empty()) { | 510 if (!timezone_name.empty()) { |
512 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 511 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
513 UTF8ToUTF16(timezone_name)); | 512 UTF8ToUTF16(timezone_name)); |
514 } | 513 } |
515 } | 514 } |
516 | 515 |
517 } // namespace chromeos | 516 } // namespace chromeos |
OLD | NEW |