Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5007)

Unified Diff: chrome/browser/chromeos/login/webui_login_view.cc

Issue 10824203: Initialize OOBE/login WebUI in hidden state in parallel with wallpaper animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix how login prompt-visible is emitted Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/webui_login_view.cc
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 138ebcfd88b04a6b6ce254814b49f94024276f1d..cd94bb1ab00dec70033374b09356fb2f34c52f61 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -115,6 +115,9 @@ WebUILoginView::WebUILoginView()
: webui_login_(NULL),
login_window_(NULL),
host_window_frozen_(false),
+ is_hidden_(false),
+ login_visible_notification_fired_(false),
+ login_prompt_visible_handled_(false),
should_emit_login_prompt_visible_(true) {
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE,
@@ -231,6 +234,13 @@ void WebUILoginView::OpenProxySettings() {
dialog->Show();
}
+void WebUILoginView::OnPostponedShow() {
+ set_is_hidden(false);
+ // If notification will happen later let it fire login-prompt-visible signal.
+ if (login_visible_notification_fired_)
+ OnLoginPromptVisible();
+}
+
void WebUILoginView::SetStatusAreaVisible(bool visible) {
ash::SystemTray* tray = ash::Shell::GetInstance()->system_tray();
if (tray) {
@@ -270,6 +280,7 @@ void WebUILoginView::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE: {
+ login_visible_notification_fired_ = true;
OnLoginPromptVisible();
registrar_.RemoveAll();
break;
@@ -342,10 +353,15 @@ void WebUILoginView::RequestMediaAccessPermission(
}
void WebUILoginView::OnLoginPromptVisible() {
+ // If we're hidden than will generate this signal once we're shown.
+ if (is_hidden_ || login_prompt_visible_handled_)
+ return;
+
if (should_emit_login_prompt_visible_) {
chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
EmitLoginPromptVisible();
}
+ login_prompt_visible_handled_ = true;
OobeUI* oobe_ui = static_cast<OobeUI*>(GetWebUI()->GetController());
// Notify OOBE that the login frame has been rendered. Currently
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698