| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 ash::Shell::GetPrimaryRootWindow(), | 984 ash::Shell::GetPrimaryRootWindow(), |
| 985 ash::internal::kShellWindowId_LockScreenContainer); | 985 ash::internal::kShellWindowId_LockScreenContainer); |
| 986 | 986 |
| 987 login_window_ = new views::Widget; | 987 login_window_ = new views::Widget; |
| 988 login_window_->Init(params); | 988 login_window_->Init(params); |
| 989 login_view_ = new WebUILoginView(); | 989 login_view_ = new WebUILoginView(); |
| 990 login_view_->Init(); | 990 login_view_->Init(); |
| 991 if (login_view_->webui_visible()) | 991 if (login_view_->webui_visible()) |
| 992 OnLoginPromptVisible(); | 992 OnLoginPromptVisible(); |
| 993 | 993 |
| 994 views::corewm::SetWindowVisibilityAnimationDuration( | 994 wm::SetWindowVisibilityAnimationDuration( |
| 995 login_window_->GetNativeView(), | 995 login_window_->GetNativeView(), |
| 996 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); | 996 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); |
| 997 views::corewm::SetWindowVisibilityAnimationTransition( | 997 wm::SetWindowVisibilityAnimationTransition( |
| 998 login_window_->GetNativeView(), | 998 login_window_->GetNativeView(), |
| 999 views::corewm::ANIMATE_HIDE); | 999 wm::ANIMATE_HIDE); |
| 1000 | 1000 |
| 1001 login_window_->SetContentsView(login_view_); | 1001 login_window_->SetContentsView(login_view_); |
| 1002 | 1002 |
| 1003 // If WebUI is initialized in hidden state, show it only if we're no | 1003 // If WebUI is initialized in hidden state, show it only if we're no |
| 1004 // longer waiting for wallpaper animation/user images loading. Otherwise, | 1004 // longer waiting for wallpaper animation/user images loading. Otherwise, |
| 1005 // always show it. | 1005 // always show it. |
| 1006 if (!initialize_webui_hidden_ || | 1006 if (!initialize_webui_hidden_ || |
| 1007 (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { | 1007 (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { |
| 1008 LOG(WARNING) << "Login WebUI >> show login wnd on create"; | 1008 LOG(WARNING) << "Login WebUI >> show login wnd on create"; |
| 1009 login_window_->Show(); | 1009 login_window_->Show(); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1214 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1215 new locale_util::SwitchLanguageCallback( | 1215 new locale_util::SwitchLanguageCallback( |
| 1216 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1216 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1217 | 1217 |
| 1218 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1218 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1219 locale_util::SwitchLanguage( | 1219 locale_util::SwitchLanguage( |
| 1220 locale, true, true /* login_layouts_only */, callback.Pass()); | 1220 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 } // namespace chromeos | 1223 } // namespace chromeos |
| OLD | NEW |