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/desktop_background/desktop_background_controller.h" | 9 #include "ash/desktop_background/desktop_background_controller.h" |
10 #include "ash/desktop_background/user_wallpaper_delegate.h" | 10 #include "ash/desktop_background/user_wallpaper_delegate.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 // URL which corresponds to the OOBE WebUI. | 94 // URL which corresponds to the OOBE WebUI. |
95 const char kOobeURL[] = "chrome://oobe/oobe"; | 95 const char kOobeURL[] = "chrome://oobe/oobe"; |
96 | 96 |
97 // URL which corresponds to the user adding WebUI. | 97 // URL which corresponds to the user adding WebUI. |
98 const char kUserAddingURL[] = "chrome://oobe/user-adding"; | 98 const char kUserAddingURL[] = "chrome://oobe/user-adding"; |
99 | 99 |
100 // URL which corresponds to the app launch splash WebUI. | 100 // URL which corresponds to the app launch splash WebUI. |
101 const char kAppLaunchSplashURL[] = "chrome://oobe/app-launch-splash"; | 101 const char kAppLaunchSplashURL[] = "chrome://oobe/app-launch-splash"; |
102 | 102 |
103 // Duration of sign-in transition animation. | 103 // Duration of sign-in transition animation. |
104 const int kLoginFadeoutTransitionDurationMs = 700; | 104 const int kLoginFadeoutTransitionDurationMs = 7000; |
105 | 105 |
106 // Number of times we try to reload OOBE/login WebUI if it crashes. | 106 // Number of times we try to reload OOBE/login WebUI if it crashes. |
107 const int kCrashCountLimit = 5; | 107 const int kCrashCountLimit = 5; |
108 | 108 |
109 // Whether to enable tnitializing WebUI in hidden state (see | 109 // Whether to enable tnitializing WebUI in hidden state (see |
110 // |initialize_webui_hidden_|) by default. | 110 // |initialize_webui_hidden_|) by default. |
111 const bool kHiddenWebUIInitializationDefault = true; | 111 const bool kHiddenWebUIInitializationDefault = true; |
112 | 112 |
113 // Switch values that might be used to override WebUI init type. | 113 // Switch values that might be used to override WebUI init type. |
114 const char kWebUIInitParallel[] = "parallel"; | 114 const char kWebUIInitParallel[] = "parallel"; |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
973 ash::Shell::GetPrimaryRootWindow(), | 973 ash::Shell::GetPrimaryRootWindow(), |
974 ash::internal::kShellWindowId_LockScreenContainer); | 974 ash::internal::kShellWindowId_LockScreenContainer); |
975 | 975 |
976 login_window_ = new views::Widget; | 976 login_window_ = new views::Widget; |
977 login_window_->Init(params); | 977 login_window_->Init(params); |
978 login_view_ = new WebUILoginView(); | 978 login_view_ = new WebUILoginView(); |
979 login_view_->Init(); | 979 login_view_->Init(); |
980 if (login_view_->webui_visible()) | 980 if (login_view_->webui_visible()) |
981 OnLoginPromptVisible(); | 981 OnLoginPromptVisible(); |
982 | 982 |
983 views::corewm::SetWindowVisibilityAnimationDuration( | 983 views::corewm::SetWindowHideAnimationDuration( |
pkotwicz
2013/12/23 01:12:06
This call is a no-op. I filed crbug.com/330469
| |
984 login_window_->GetNativeView(), | 984 login_window_->GetNativeView(), |
985 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); | 985 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); |
986 views::corewm::SetWindowVisibilityAnimationTransition( | 986 views::corewm::SetWindowVisibilityAnimationTransition( |
987 login_window_->GetNativeView(), | 987 login_window_->GetNativeView(), |
988 views::corewm::ANIMATE_HIDE); | 988 views::corewm::ANIMATE_HIDE); |
989 | 989 |
990 login_window_->SetContentsView(login_view_); | 990 login_window_->SetContentsView(login_view_); |
991 | 991 |
992 // If WebUI is initialized in hidden state, show it only if we're no | 992 // If WebUI is initialized in hidden state, show it only if we're no |
993 // longer waiting for wallpaper animation/user images loading. Otherwise, | 993 // longer waiting for wallpaper animation/user images loading. Otherwise, |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1195 | 1195 |
1196 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1196 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
1197 new locale_util::SwitchLanguageCallback( | 1197 new locale_util::SwitchLanguageCallback( |
1198 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1198 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
1199 | 1199 |
1200 // Do not load locale keyboards here. | 1200 // Do not load locale keyboards here. |
1201 locale_util::SwitchLanguage(locale, false, callback.Pass()); | 1201 locale_util::SwitchLanguage(locale, false, callback.Pass()); |
1202 } | 1202 } |
1203 | 1203 |
1204 } // namespace chromeos | 1204 } // namespace chromeos |
OLD | NEW |