| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #include "ui/gfx/display.h" | 86 #include "ui/gfx/display.h" |
| 87 #include "ui/gfx/rect.h" | 87 #include "ui/gfx/rect.h" |
| 88 #include "ui/gfx/screen.h" | 88 #include "ui/gfx/screen.h" |
| 89 #include "ui/gfx/size.h" | 89 #include "ui/gfx/size.h" |
| 90 #include "ui/gfx/transform.h" | 90 #include "ui/gfx/transform.h" |
| 91 #include "ui/keyboard/keyboard_controller.h" | 91 #include "ui/keyboard/keyboard_controller.h" |
| 92 #include "ui/keyboard/keyboard_util.h" | 92 #include "ui/keyboard/keyboard_util.h" |
| 93 #include "ui/views/focus/focus_manager.h" | 93 #include "ui/views/focus/focus_manager.h" |
| 94 #include "ui/views/widget/widget.h" | 94 #include "ui/views/widget/widget.h" |
| 95 #include "ui/views/widget/widget_delegate.h" | 95 #include "ui/views/widget/widget_delegate.h" |
| 96 #include "ui/wm/core/window_animations.h" | |
| 97 #include "url/gurl.h" | 96 #include "url/gurl.h" |
| 98 | 97 |
| 99 #if defined(USE_ATHENA) | 98 #if defined(USE_ATHENA) |
| 100 #include "athena/screen/public/screen_manager.h" | 99 #include "athena/screen/public/screen_manager.h" |
| 101 #include "athena/util/container_priorities.h" | 100 #include "athena/util/container_priorities.h" |
| 102 #include "athena/util/fill_layout_manager.h" | 101 #include "athena/util/fill_layout_manager.h" |
| 103 #endif | 102 #endif |
| 104 | 103 |
| 105 namespace { | 104 namespace { |
| 106 | 105 |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 #endif | 1081 #endif |
| 1083 login_window_ = new views::Widget; | 1082 login_window_ = new views::Widget; |
| 1084 params.delegate = new LoginWidgetDelegate(login_window_); | 1083 params.delegate = new LoginWidgetDelegate(login_window_); |
| 1085 login_window_->Init(params); | 1084 login_window_->Init(params); |
| 1086 | 1085 |
| 1087 login_view_ = new WebUILoginView(); | 1086 login_view_ = new WebUILoginView(); |
| 1088 login_view_->Init(); | 1087 login_view_->Init(); |
| 1089 if (login_view_->webui_visible()) | 1088 if (login_view_->webui_visible()) |
| 1090 OnLoginPromptVisible(); | 1089 OnLoginPromptVisible(); |
| 1091 | 1090 |
| 1092 wm::SetWindowVisibilityAnimationDuration( | 1091 login_window_->GetVisibilityAnimation()->SetDuration( |
| 1093 login_window_->GetNativeView(), | |
| 1094 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); | 1092 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); |
| 1095 wm::SetWindowVisibilityAnimationTransition( | 1093 login_window_->GetVisibilityAnimation()->SetTransition( |
| 1096 login_window_->GetNativeView(), | 1094 views::Widget::VisibilityAnimation::ANIMATE_HIDE); |
| 1097 wm::ANIMATE_HIDE); | |
| 1098 | 1095 |
| 1099 login_window_->AddRemovalsObserver(this); | 1096 login_window_->AddRemovalsObserver(this); |
| 1100 login_window_->SetContentsView(login_view_); | 1097 login_window_->SetContentsView(login_view_); |
| 1101 | 1098 |
| 1102 // If WebUI is initialized in hidden state, show it only if we're no | 1099 // If WebUI is initialized in hidden state, show it only if we're no |
| 1103 // longer waiting for wallpaper animation/user images loading. Otherwise, | 1100 // longer waiting for wallpaper animation/user images loading. Otherwise, |
| 1104 // always show it. | 1101 // always show it. |
| 1105 if (!initialize_webui_hidden_ || | 1102 if (!initialize_webui_hidden_ || |
| 1106 (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { | 1103 (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { |
| 1107 VLOG(1) << "Login WebUI >> show login wnd on create"; | 1104 VLOG(1) << "Login WebUI >> show login wnd on create"; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1299 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1303 new locale_util::SwitchLanguageCallback( | 1300 new locale_util::SwitchLanguageCallback( |
| 1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1301 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1305 | 1302 |
| 1306 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1303 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1307 locale_util::SwitchLanguage( | 1304 locale_util::SwitchLanguage( |
| 1308 locale, true, true /* login_layouts_only */, callback.Pass()); | 1305 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1309 } | 1306 } |
| 1310 | 1307 |
| 1311 } // namespace chromeos | 1308 } // namespace chromeos |
| OLD | NEW |