Chromium Code Reviews| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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/profiles/profile_manager.h" | 58 #include "chrome/browser/profiles/profile_manager.h" |
| 59 #include "chrome/browser/themes/theme_service.h" | |
| 60 #include "chrome/browser/themes/theme_service_factory.h" | |
| 61 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | |
| 59 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 62 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 60 #include "chrome/common/chrome_constants.h" | 63 #include "chrome/common/chrome_constants.h" |
| 61 #include "chrome/common/chrome_switches.h" | 64 #include "chrome/common/chrome_switches.h" |
| 62 #include "chrome/common/pref_names.h" | 65 #include "chrome/common/pref_names.h" |
| 63 #include "chrome/grit/browser_resources.h" | 66 #include "chrome/grit/browser_resources.h" |
| 64 #include "chromeos/audio/chromeos_sounds.h" | 67 #include "chromeos/audio/chromeos_sounds.h" |
| 65 #include "chromeos/chromeos_constants.h" | 68 #include "chromeos/chromeos_constants.h" |
| 66 #include "chromeos/chromeos_switches.h" | 69 #include "chromeos/chromeos_switches.h" |
| 67 #include "chromeos/dbus/dbus_thread_manager.h" | 70 #include "chromeos/dbus/dbus_thread_manager.h" |
| 68 #include "chromeos/dbus/session_manager_client.h" | 71 #include "chromeos/dbus/session_manager_client.h" |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1010 keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler); | 1013 keyboard_driven_oobe_key_handler_.reset(new KeyboardDrivenOobeKeyHandler); |
| 1011 } | 1014 } |
| 1012 | 1015 |
| 1013 views::Widget::InitParams params( | 1016 views::Widget::InitParams params( |
| 1014 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 1017 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 1015 params.bounds = background_bounds(); | 1018 params.bounds = background_bounds(); |
| 1016 params.show_state = ui::SHOW_STATE_FULLSCREEN; | 1019 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
| 1017 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 1020 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 1018 params.parent = | 1021 params.parent = |
| 1019 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), | 1022 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
| 1020 ash::kShellWindowId_LockScreenContainer); | 1023 ash::kShellWindowId_LockScreenContainer); |
|
oshima
2015/09/10 00:20:38
this parent will never have associated profile. Th
| |
| 1024 // On login screen and logged in as an anonymous user you might not get a | |
| 1025 // profile. Which indicates that multi-user is not active and an anonymous | |
| 1026 // profile is in use. Take the active profile to find the theme. | |
| 1027 Profile* profile = multi_user_util::GetProfileFromWindow(params.parent); | |
| 1028 if (!profile) | |
| 1029 profile = ProfileManager::GetActiveUserProfile(); | |
| 1030 params.theme_provider = ThemeServiceFactory::GetForProfile(profile); | |
| 1021 login_window_ = new views::Widget; | 1031 login_window_ = new views::Widget; |
| 1022 params.delegate = new LoginWidgetDelegate(login_window_); | 1032 params.delegate = new LoginWidgetDelegate(login_window_); |
| 1023 login_window_->Init(params); | 1033 login_window_->Init(params); |
| 1024 | 1034 |
| 1025 login_view_ = new WebUILoginView(); | 1035 login_view_ = new WebUILoginView(); |
| 1026 login_view_->Init(); | 1036 login_view_->Init(); |
| 1027 if (login_view_->webui_visible()) | 1037 if (login_view_->webui_visible()) |
| 1028 OnLoginPromptVisible(); | 1038 OnLoginPromptVisible(); |
| 1029 | 1039 |
| 1030 login_window_->SetVisibilityAnimationDuration( | 1040 login_window_->SetVisibilityAnimationDuration( |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1256 | 1266 |
| 1257 locale_util::SwitchLanguageCallback callback( | 1267 locale_util::SwitchLanguageCallback callback( |
| 1258 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); | 1268 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); |
| 1259 | 1269 |
| 1260 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1270 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1261 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, | 1271 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, |
| 1262 callback, ProfileManager::GetActiveUserProfile()); | 1272 callback, ProfileManager::GetActiveUserProfile()); |
| 1263 } | 1273 } |
| 1264 | 1274 |
| 1265 } // namespace chromeos | 1275 } // namespace chromeos |
| OLD | NEW |