Commit 1c85eb42 authored by antrim@chromium.org's avatar antrim@chromium.org

ChromeOS login webui refactoring: split user selection/gaia login screens.

Phase one : introduce future screen classes before moving code from handler.

BUG=373314

Review URL: https://codereview.chromium.org/293613003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272870 0039d316-1c4b-4281-b951-d872f2087c98
parent 7c65c2b9
...@@ -609,7 +609,6 @@ void ExistingUserController::SetDisplayEmail(const std::string& email) { ...@@ -609,7 +609,6 @@ void ExistingUserController::SetDisplayEmail(const std::string& email) {
void ExistingUserController::ShowWrongHWIDScreen() { void ExistingUserController::ShowWrongHWIDScreen() {
scoped_ptr<base::DictionaryValue> params; scoped_ptr<base::DictionaryValue> params;
host_->StartWizard(WizardController::kWrongHWIDScreenName, params.Pass()); host_->StartWizard(WizardController::kWrongHWIDScreenName, params.Pass());
login_display_->OnFadeOut();
} }
void ExistingUserController::Signout() { void ExistingUserController::Signout() {
...@@ -654,26 +653,22 @@ void ExistingUserController::ShowEnrollmentScreen(bool is_auto_enrollment, ...@@ -654,26 +653,22 @@ void ExistingUserController::ShowEnrollmentScreen(bool is_auto_enrollment,
} }
host_->StartWizard(WizardController::kEnrollmentScreenName, host_->StartWizard(WizardController::kEnrollmentScreenName,
params.Pass()); params.Pass());
login_display_->OnFadeOut();
} }
void ExistingUserController::ShowResetScreen() { void ExistingUserController::ShowResetScreen() {
scoped_ptr<base::DictionaryValue> params; scoped_ptr<base::DictionaryValue> params;
host_->StartWizard(WizardController::kResetScreenName, params.Pass()); host_->StartWizard(WizardController::kResetScreenName, params.Pass());
login_display_->OnFadeOut();
} }
void ExistingUserController::ShowKioskEnableScreen() { void ExistingUserController::ShowKioskEnableScreen() {
scoped_ptr<base::DictionaryValue> params; scoped_ptr<base::DictionaryValue> params;
host_->StartWizard(WizardController::kKioskEnableScreenName, params.Pass()); host_->StartWizard(WizardController::kKioskEnableScreenName, params.Pass());
login_display_->OnFadeOut();
} }
void ExistingUserController::ShowKioskAutolaunchScreen() { void ExistingUserController::ShowKioskAutolaunchScreen() {
scoped_ptr<base::DictionaryValue> params; scoped_ptr<base::DictionaryValue> params;
host_->StartWizard(WizardController::kKioskAutolaunchScreenName, host_->StartWizard(WizardController::kKioskAutolaunchScreenName,
params.Pass()); params.Pass());
login_display_->OnFadeOut();
} }
void ExistingUserController::ShowTPMError() { void ExistingUserController::ShowTPMError() {
...@@ -784,9 +779,6 @@ void ExistingUserController::OnLoginSuccess(const UserContext& user_context) { ...@@ -784,9 +779,6 @@ void ExistingUserController::OnLoginSuccess(const UserContext& user_context) {
this); this);
display_email_.clear(); display_email_.clear();
// Notify LoginDisplay to allow it provide visual feedback to user.
login_display_->OnLoginSuccess(user_context.GetUserID());
} }
void ExistingUserController::OnProfilePrepared(Profile* profile) { void ExistingUserController::OnProfilePrepared(Profile* profile) {
...@@ -827,7 +819,6 @@ void ExistingUserController::OnProfilePrepared(Profile* profile) { ...@@ -827,7 +819,6 @@ void ExistingUserController::OnProfilePrepared(Profile* profile) {
// Inform |login_status_consumer_| about successful login. // Inform |login_status_consumer_| about successful login.
if (login_status_consumer_) if (login_status_consumer_)
login_status_consumer_->OnLoginSuccess(UserContext()); login_status_consumer_->OnLoginSuccess(UserContext());
login_display_->OnFadeOut();
} }
void ExistingUserController::OnOffTheRecordLoginSuccess() { void ExistingUserController::OnOffTheRecordLoginSuccess() {
......
...@@ -250,12 +250,8 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, ExistingUserLogin) { ...@@ -250,12 +250,8 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, ExistingUserLogin) {
DoBrowserLaunch(testing_profile_.get(), DoBrowserLaunch(testing_profile_.get(),
mock_login_display_host_.get())) mock_login_display_host_.get()))
.Times(1); .Times(1);
EXPECT_CALL(*mock_login_display_, OnLoginSuccess(kUsername))
.Times(1);
EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) EXPECT_CALL(*mock_login_display_, SetUIEnabled(true))
.Times(1); .Times(1);
EXPECT_CALL(*mock_login_display_, OnFadeOut())
.Times(1);
EXPECT_CALL(*mock_login_display_host_, EXPECT_CALL(*mock_login_display_host_,
StartWizardPtr(WizardController::kTermsOfServiceScreenName, NULL)) StartWizardPtr(WizardController::kTermsOfServiceScreenName, NULL))
.Times(0); .Times(0);
...@@ -271,8 +267,6 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, AutoEnrollAfterSignIn) { ...@@ -271,8 +267,6 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, AutoEnrollAfterSignIn) {
StartWizardPtr(WizardController::kEnrollmentScreenName, StartWizardPtr(WizardController::kEnrollmentScreenName,
_)) _))
.Times(1); .Times(1);
EXPECT_CALL(*mock_login_display_, OnFadeOut())
.Times(1);
EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin()) EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin())
.Times(1); .Times(1);
EXPECT_CALL(*mock_user_manager_, IsCurrentUserNew()) EXPECT_CALL(*mock_user_manager_, IsCurrentUserNew())
...@@ -321,10 +315,6 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, ...@@ -321,10 +315,6 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest,
&base::Callback<void(void)>::Run), &base::Callback<void(void)>::Run),
InvokeWithoutArgs(&profile_prepared_cb_, InvokeWithoutArgs(&profile_prepared_cb_,
&base::Callback<void(void)>::Run))); &base::Callback<void(void)>::Run)));
EXPECT_CALL(*mock_login_display_, OnLoginSuccess(kNewUsername))
.Times(1);
EXPECT_CALL(*mock_login_display_, OnFadeOut())
.Times(1);
EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin()) EXPECT_CALL(*mock_login_display_host_.get(), OnCompleteLogin())
.Times(1); .Times(1);
EXPECT_CALL(*mock_user_manager_, IsCurrentUserNew()) EXPECT_CALL(*mock_user_manager_, IsCurrentUserNew())
...@@ -454,12 +444,8 @@ class ExistingUserControllerPublicSessionTest ...@@ -454,12 +444,8 @@ class ExistingUserControllerPublicSessionTest
DoBrowserLaunch(testing_profile_.get(), DoBrowserLaunch(testing_profile_.get(),
mock_login_display_host_.get())) mock_login_display_host_.get()))
.Times(1); .Times(1);
EXPECT_CALL(*mock_login_display_, OnLoginSuccess(username))
.Times(1);
EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) EXPECT_CALL(*mock_login_display_, SetUIEnabled(true))
.Times(1); .Times(1);
EXPECT_CALL(*mock_login_display_, OnFadeOut())
.Times(1);
EXPECT_CALL(*mock_login_display_host_, EXPECT_CALL(*mock_login_display_host_,
StartWizardPtr(WizardController::kTermsOfServiceScreenName, StartWizardPtr(WizardController::kTermsOfServiceScreenName,
NULL)) NULL))
......
...@@ -28,7 +28,6 @@ class CoreOobeActor { ...@@ -28,7 +28,6 @@ class CoreOobeActor {
virtual void ResetSignInUI(bool force_online) = 0; virtual void ResetSignInUI(bool force_online) = 0;
virtual void ClearUserPodPassword() = 0; virtual void ClearUserPodPassword() = 0;
virtual void RefocusCurrentPod() = 0; virtual void RefocusCurrentPod() = 0;
virtual void OnLoginSuccess(const std::string& username) = 0;
virtual void ShowPasswordChangedScreen(bool show_password_error) = 0; virtual void ShowPasswordChangedScreen(bool show_password_error) = 0;
virtual void SetUsageStats(bool checked) = 0; virtual void SetUsageStats(bool checked) = 0;
virtual void SetOemEulaUrl(const std::string& oem_eula_url) = 0; virtual void SetOemEulaUrl(const std::string& oem_eula_url) = 0;
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/login/screens/gaia_screen.h"
#include "base/logging.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
namespace chromeos {
GaiaScreen::GaiaScreen() : handler_(NULL) {
}
GaiaScreen::~GaiaScreen() {
}
void GaiaScreen::SetHandler(LoginDisplayWebUIHandler* handler) {
handler_ = handler;
}
} // namespace chromeos
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_GAIA_SCREEN_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_GAIA_SCREEN_H_
#include <string>
#include "base/bind.h"
#include "base/compiler_specific.h"
namespace chromeos {
class LoginDisplayWebUIHandler;
// This class represents GAIA screen: login screen that is responsible for
// GAIA-based sign-in.
class GaiaScreen {
public:
GaiaScreen();
virtual ~GaiaScreen();
void SetHandler(LoginDisplayWebUIHandler* handler);
private:
LoginDisplayWebUIHandler* handler_;
DISALLOW_COPY_AND_ASSIGN(GaiaScreen);
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_GAIA_SCREEN_H_
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
#include "base/logging.h"
#include "chrome/browser/chromeos/login/screens/screen_observer.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
namespace chromeos {
UserSelectionScreen::UserSelectionScreen() : handler_(NULL) {
}
UserSelectionScreen::~UserSelectionScreen() {
}
void UserSelectionScreen::SetHandler(LoginDisplayWebUIHandler* handler) {
handler_ = handler;
}
void UserSelectionScreen::Init(const UserList& users) {
users_ = users;
}
void UserSelectionScreen::OnBeforeUserRemoved(const std::string& username) {
for (UserList::iterator it = users_.begin(); it != users_.end(); ++it) {
if ((*it)->email() == username) {
users_.erase(it);
break;
}
}
}
void UserSelectionScreen::OnUserRemoved(const std::string& username) {
if (!handler_)
return;
handler_->OnUserRemoved(username);
}
void UserSelectionScreen::OnUserImageChanged(const User& user) {
if (!handler_)
return;
handler_->OnUserImageChanged(user);
// TODO(antrim) : updateUserImage(user.email())
}
const UserList& UserSelectionScreen::GetUsers() const {
return users_;
}
} // namespace chromeos
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
#include <string>
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "chrome/browser/chromeos/login/users/user.h"
namespace chromeos {
class LoginDisplayWebUIHandler;
// This class represents User Selection screen: user pod-based login screen.
class UserSelectionScreen {
public:
UserSelectionScreen();
virtual ~UserSelectionScreen();
void SetHandler(LoginDisplayWebUIHandler* handler);
void Init(const UserList& users);
const UserList& GetUsers() const;
void OnUserImageChanged(const User& user);
void OnBeforeUserRemoved(const std::string& username);
void OnUserRemoved(const std::string& username);
private:
LoginDisplayWebUIHandler* handler_;
// Set of Users that are visible.
UserList users_;
DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen);
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
...@@ -131,20 +131,9 @@ class LoginDisplay : public RemoveUserDelegate { ...@@ -131,20 +131,9 @@ class LoginDisplay : public RemoveUserDelegate {
// |user| contains updated user. // |user| contains updated user.
virtual void OnUserImageChanged(const User& user) = 0; virtual void OnUserImageChanged(const User& user) = 0;
// After this call login display should be ready to be smoothly destroyed
// (e.g. hide throbber, etc.).
virtual void OnFadeOut() = 0;
// Called when user is successfully authenticated.
virtual void OnLoginSuccess(const std::string& username) = 0;
// Changes enabled state of the UI. // Changes enabled state of the UI.
virtual void SetUIEnabled(bool is_enabled) = 0; virtual void SetUIEnabled(bool is_enabled) = 0;
// Selects user entry with specified |index|.
// Does nothing if current user is already selected.
virtual void SelectPod(int index) = 0;
// Displays simple error bubble with |error_msg_id| specified. // Displays simple error bubble with |error_msg_id| specified.
// |login_attempts| shows number of login attempts made by current user. // |login_attempts| shows number of login attempts made by current user.
// |help_topic_id| is additional help topic that is presented as link. // |help_topic_id| is additional help topic that is presented as link.
......
...@@ -20,10 +20,7 @@ class MockLoginDisplay : public LoginDisplay { ...@@ -20,10 +20,7 @@ class MockLoginDisplay : public LoginDisplay {
MOCK_METHOD4(Init, void(const UserList&, bool, bool, bool)); MOCK_METHOD4(Init, void(const UserList&, bool, bool, bool));
MOCK_METHOD0(OnPreferencesChanged, void(void)); MOCK_METHOD0(OnPreferencesChanged, void(void));
MOCK_METHOD1(OnUserImageChanged, void(const User&)); MOCK_METHOD1(OnUserImageChanged, void(const User&));
MOCK_METHOD0(OnFadeOut, void(void));
MOCK_METHOD1(OnLoginSuccess, void(const std::string&));
MOCK_METHOD1(SetUIEnabled, void(bool)); MOCK_METHOD1(SetUIEnabled, void(bool));
MOCK_METHOD1(SelectPod, void(int));
MOCK_METHOD3(ShowError, void(int, int, HelpAppLauncher::HelpTopic)); MOCK_METHOD3(ShowError, void(int, int, HelpAppLauncher::HelpTopic));
MOCK_METHOD1(ShowErrorScreen, void(LoginDisplay::SigninError)); MOCK_METHOD1(ShowErrorScreen, void(LoginDisplay::SigninError));
MOCK_METHOD1(ShowGaiaPasswordChanged, void(const std::string&)); MOCK_METHOD1(ShowGaiaPasswordChanged, void(const std::string&));
......
...@@ -46,7 +46,9 @@ WebUILoginDisplay::WebUILoginDisplay(LoginDisplay::Delegate* delegate) ...@@ -46,7 +46,9 @@ WebUILoginDisplay::WebUILoginDisplay(LoginDisplay::Delegate* delegate)
: LoginDisplay(delegate, gfx::Rect()), : LoginDisplay(delegate, gfx::Rect()),
show_guest_(false), show_guest_(false),
show_new_user_(false), show_new_user_(false),
webui_handler_(NULL) { webui_handler_(NULL),
gaia_screen_(new GaiaScreen()),
user_selection_screen_(new UserSelectionScreen()) {
} }
void WebUILoginDisplay::ClearAndEnablePassword() { void WebUILoginDisplay::ClearAndEnablePassword() {
...@@ -61,7 +63,7 @@ void WebUILoginDisplay::Init(const UserList& users, ...@@ -61,7 +63,7 @@ void WebUILoginDisplay::Init(const UserList& users,
// Testing that the delegate has been set. // Testing that the delegate has been set.
DCHECK(delegate_); DCHECK(delegate_);
users_ = users; user_selection_screen_->Init(users);
show_guest_ = show_guest; show_guest_ = show_guest;
show_users_ = show_users; show_users_ = show_users;
show_new_user_ = show_new_user; show_new_user_ = show_new_user;
...@@ -72,36 +74,35 @@ void WebUILoginDisplay::Init(const UserList& users, ...@@ -72,36 +74,35 @@ void WebUILoginDisplay::Init(const UserList& users,
activity_detector->AddObserver(this); activity_detector->AddObserver(this);
} }
void WebUILoginDisplay::OnPreferencesChanged() { // ---- Common methods
if (webui_handler_)
webui_handler_->OnPreferencesChanged(); // ---- User selection screen methods
}
void WebUILoginDisplay::OnBeforeUserRemoved(const std::string& username) { void WebUILoginDisplay::OnBeforeUserRemoved(const std::string& username) {
for (UserList::iterator it = users_.begin(); it != users_.end(); ++it) { user_selection_screen_->OnBeforeUserRemoved(username);
if ((*it)->email() == username) {
users_.erase(it);
break;
}
}
} }
void WebUILoginDisplay::OnUserImageChanged(const User& user) { void WebUILoginDisplay::OnUserRemoved(const std::string& username) {
if (webui_handler_) user_selection_screen_->OnUserRemoved(username);
webui_handler_->OnUserImageChanged(user);
} }
void WebUILoginDisplay::OnUserRemoved(const std::string& username) { void WebUILoginDisplay::OnUserImageChanged(const User& user) {
if (webui_handler_) user_selection_screen_->OnUserImageChanged(user);
webui_handler_->OnUserRemoved(username);
} }
void WebUILoginDisplay::OnFadeOut() { // User selection screen, screen lock API
const UserList& WebUILoginDisplay::GetUsers() const {
return user_selection_screen_->GetUsers();
} }
void WebUILoginDisplay::OnLoginSuccess(const std::string& username) { // ---- Gaia screen methods
// ---- Not yet classified methods
void WebUILoginDisplay::OnPreferencesChanged() {
if (webui_handler_) if (webui_handler_)
webui_handler_->OnLoginSuccess(username); webui_handler_->OnPreferencesChanged();
} }
void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { void WebUILoginDisplay::SetUIEnabled(bool is_enabled) {
...@@ -110,9 +111,8 @@ void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { ...@@ -110,9 +111,8 @@ void WebUILoginDisplay::SetUIEnabled(bool is_enabled) {
// Allow this call only before user sign in or at lock screen. // Allow this call only before user sign in or at lock screen.
// If this call is made after new user signs in but login screen is still // If this call is made after new user signs in but login screen is still
// around that would trigger a sign in extension refresh. // around that would trigger a sign in extension refresh.
if (is_enabled && if (is_enabled && (!UserManager::Get()->IsUserLoggedIn() ||
(!UserManager::Get()->IsUserLoggedIn() || ScreenLocker::default_screen_locker())) {
ScreenLocker::default_screen_locker())) {
ClearAndEnablePassword(); ClearAndEnablePassword();
} }
...@@ -123,9 +123,6 @@ void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { ...@@ -123,9 +123,6 @@ void WebUILoginDisplay::SetUIEnabled(bool is_enabled) {
} }
} }
void WebUILoginDisplay::SelectPod(int index) {
}
void WebUILoginDisplay::ShowError(int error_msg_id, void WebUILoginDisplay::ShowError(int error_msg_id,
int login_attempts, int login_attempts,
HelpAppLauncher::HelpTopic help_topic_id) { HelpAppLauncher::HelpTopic help_topic_id) {
...@@ -332,6 +329,8 @@ void WebUILoginDisplay::ShowWrongHWIDScreen() { ...@@ -332,6 +329,8 @@ void WebUILoginDisplay::ShowWrongHWIDScreen() {
void WebUILoginDisplay::SetWebUIHandler( void WebUILoginDisplay::SetWebUIHandler(
LoginDisplayWebUIHandler* webui_handler) { LoginDisplayWebUIHandler* webui_handler) {
webui_handler_ = webui_handler; webui_handler_ = webui_handler;
gaia_screen_->SetHandler(webui_handler_);
user_selection_screen_->SetHandler(webui_handler_);
} }
void WebUILoginDisplay::ShowSigninScreenForCreds( void WebUILoginDisplay::ShowSigninScreenForCreds(
...@@ -341,10 +340,6 @@ void WebUILoginDisplay::ShowSigninScreenForCreds( ...@@ -341,10 +340,6 @@ void WebUILoginDisplay::ShowSigninScreenForCreds(
webui_handler_->ShowSigninScreenForCreds(username, password); webui_handler_->ShowSigninScreenForCreds(username, password);
} }
const UserList& WebUILoginDisplay::GetUsers() const {
return users_;
}
bool WebUILoginDisplay::IsShowGuest() const { bool WebUILoginDisplay::IsShowGuest() const {
return show_guest_; return show_guest_;
} }
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "chrome/browser/chromeos/login/screens/gaia_screen.h"
#include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
#include "chrome/browser/chromeos/login/ui/login_display.h" #include "chrome/browser/chromeos/login/ui/login_display.h"
#include "chrome/browser/chromeos/login/users/user.h" #include "chrome/browser/chromeos/login/users/user.h"
#include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h"
...@@ -37,10 +39,7 @@ class WebUILoginDisplay : public LoginDisplay, ...@@ -37,10 +39,7 @@ class WebUILoginDisplay : public LoginDisplay,
virtual void OnBeforeUserRemoved(const std::string& username) OVERRIDE; virtual void OnBeforeUserRemoved(const std::string& username) OVERRIDE;
virtual void OnUserImageChanged(const User& user) OVERRIDE; virtual void OnUserImageChanged(const User& user) OVERRIDE;
virtual void OnUserRemoved(const std::string& username) OVERRIDE; virtual void OnUserRemoved(const std::string& username) OVERRIDE;
virtual void OnFadeOut() OVERRIDE;
virtual void OnLoginSuccess(const std::string& username) OVERRIDE;
virtual void SetUIEnabled(bool is_enabled) OVERRIDE; virtual void SetUIEnabled(bool is_enabled) OVERRIDE;
virtual void SelectPod(int index) OVERRIDE;
virtual void ShowError(int error_msg_id, virtual void ShowError(int error_msg_id,
int login_attempts, int login_attempts,
HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE;
...@@ -96,9 +95,6 @@ class WebUILoginDisplay : public LoginDisplay, ...@@ -96,9 +95,6 @@ class WebUILoginDisplay : public LoginDisplay,
void StartPasswordClearTimer(); void StartPasswordClearTimer();
void OnPasswordClearTimerExpired(); void OnPasswordClearTimerExpired();
// Set of Users that are visible.
UserList users_;
// Whether to show guest login. // Whether to show guest login.
bool show_guest_; bool show_guest_;
...@@ -115,6 +111,9 @@ class WebUILoginDisplay : public LoginDisplay, ...@@ -115,6 +111,9 @@ class WebUILoginDisplay : public LoginDisplay,
// Reference to the WebUI handling layer for the login screen // Reference to the WebUI handling layer for the login screen
LoginDisplayWebUIHandler* webui_handler_; LoginDisplayWebUIHandler* webui_handler_;
scoped_ptr<GaiaScreen> gaia_screen_;
scoped_ptr<UserSelectionScreen> user_selection_screen_;
DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay);
}; };
......
...@@ -196,17 +196,6 @@ cr.define('cr.ui', function() { ...@@ -196,17 +196,6 @@ cr.define('cr.ui', function() {
login.HeaderBar.animateIn(); login.HeaderBar.animateIn();
}; };
/**
* Handles login success notification.
*/
Oobe.onLoginSuccess = function(username) {
if (Oobe.getInstance().currentScreen.id == SCREEN_ACCOUNT_PICKER) {
// TODO(nkostylev): Enable animation back when session start jank
// is reduced. See http://crosbug.com/11116 http://crosbug.com/18307
// $('pod-row').startAuthenticatedAnimation();
}
};
/** /**
* Sets text content for a div with |labelId|. * Sets text content for a div with |labelId|.
* @param {string} labelId Id of the label div. * @param {string} labelId Id of the label div.
......
...@@ -190,10 +190,6 @@ void CoreOobeHandler::RefocusCurrentPod() { ...@@ -190,10 +190,6 @@ void CoreOobeHandler::RefocusCurrentPod() {
CallJS("refocusCurrentPod"); CallJS("refocusCurrentPod");
} }
void CoreOobeHandler::OnLoginSuccess(const std::string& username) {
CallJS("onLoginSuccess", username);
}
void CoreOobeHandler::ShowPasswordChangedScreen(bool show_password_error) { void CoreOobeHandler::ShowPasswordChangedScreen(bool show_password_error) {
CallJS("showPasswordChangedScreen", show_password_error); CallJS("showPasswordChangedScreen", show_password_error);
} }
......
...@@ -69,7 +69,6 @@ class CoreOobeHandler : public BaseScreenHandler, ...@@ -69,7 +69,6 @@ class CoreOobeHandler : public BaseScreenHandler,
virtual void ResetSignInUI(bool force_online) OVERRIDE; virtual void ResetSignInUI(bool force_online) OVERRIDE;
virtual void ClearUserPodPassword() OVERRIDE; virtual void ClearUserPodPassword() OVERRIDE;
virtual void RefocusCurrentPod() OVERRIDE; virtual void RefocusCurrentPod() OVERRIDE;
virtual void OnLoginSuccess(const std::string& username) OVERRIDE;
virtual void ShowPasswordChangedScreen(bool show_password_error) OVERRIDE; virtual void ShowPasswordChangedScreen(bool show_password_error) OVERRIDE;
virtual void SetUsageStats(bool checked) OVERRIDE; virtual void SetUsageStats(bool checked) OVERRIDE;
virtual void SetOemEulaUrl(const std::string& oem_eula_url) OVERRIDE; virtual void SetOemEulaUrl(const std::string& oem_eula_url) OVERRIDE;
......
...@@ -841,10 +841,6 @@ void SigninScreenHandler::RefocusCurrentPod() { ...@@ -841,10 +841,6 @@ void SigninScreenHandler::RefocusCurrentPod() {
core_oobe_actor_->RefocusCurrentPod(); core_oobe_actor_->RefocusCurrentPod();
} }
void SigninScreenHandler::OnLoginSuccess(const std::string& username) {
core_oobe_actor_->OnLoginSuccess(username);
}
void SigninScreenHandler::OnUserRemoved(const std::string& username) { void SigninScreenHandler::OnUserRemoved(const std::string& username) {
CallJS("login.AccountPickerScreen.removeUser", username); CallJS("login.AccountPickerScreen.removeUser", username);
if (delegate_->GetUsers().empty()) if (delegate_->GetUsers().empty())
......
...@@ -73,7 +73,6 @@ class LoginDisplayWebUIHandler { ...@@ -73,7 +73,6 @@ class LoginDisplayWebUIHandler {
public: public:
virtual void ClearAndEnablePassword() = 0; virtual void ClearAndEnablePassword() = 0;
virtual void ClearUserPodPassword() = 0; virtual void ClearUserPodPassword() = 0;
virtual void OnLoginSuccess(const std::string& username) = 0;
virtual void OnUserRemoved(const std::string& username) = 0; virtual void OnUserRemoved(const std::string& username) = 0;
virtual void OnUserImageChanged(const User& user) = 0; virtual void OnUserImageChanged(const User& user) = 0;
virtual void OnPreferencesChanged() = 0; virtual void OnPreferencesChanged() = 0;
...@@ -272,7 +271,6 @@ class SigninScreenHandler ...@@ -272,7 +271,6 @@ class SigninScreenHandler
// LoginDisplayWebUIHandler implementation: // LoginDisplayWebUIHandler implementation:
virtual void ClearAndEnablePassword() OVERRIDE; virtual void ClearAndEnablePassword() OVERRIDE;
virtual void ClearUserPodPassword() OVERRIDE; virtual void ClearUserPodPassword() OVERRIDE;
virtual void OnLoginSuccess(const std::string& username) OVERRIDE;
virtual void OnUserRemoved(const std::string& username) OVERRIDE; virtual void OnUserRemoved(const std::string& username) OVERRIDE;
virtual void OnUserImageChanged(const User& user) OVERRIDE; virtual void OnUserImageChanged(const User& user) OVERRIDE;
virtual void OnPreferencesChanged() OVERRIDE; virtual void OnPreferencesChanged() OVERRIDE;
......
...@@ -587,6 +587,8 @@ ...@@ -587,6 +587,8 @@
'browser/chromeos/login/screens/eula_screen.cc', 'browser/chromeos/login/screens/eula_screen.cc',
'browser/chromeos/login/screens/eula_screen.h', 'browser/chromeos/login/screens/eula_screen.h',
'browser/chromeos/login/screens/eula_screen_actor.h', 'browser/chromeos/login/screens/eula_screen_actor.h',
'browser/chromeos/login/screens/gaia_screen.cc',
'browser/chromeos/login/screens/gaia_screen.h',
'browser/chromeos/login/screens/hid_detection_screen.cc', 'browser/chromeos/login/screens/hid_detection_screen.cc',
'browser/chromeos/login/screens/hid_detection_screen.h', 'browser/chromeos/login/screens/hid_detection_screen.h',
'browser/chromeos/login/screens/hid_detection_screen_actor.h', 'browser/chromeos/login/screens/hid_detection_screen_actor.h',
...@@ -619,6 +621,8 @@ ...@@ -619,6 +621,8 @@
'browser/chromeos/login/screens/user_image_screen.cc', 'browser/chromeos/login/screens/user_image_screen.cc',
'browser/chromeos/login/screens/user_image_screen.h', 'browser/chromeos/login/screens/user_image_screen.h',
'browser/chromeos/login/screens/user_image_screen_actor.h', 'browser/chromeos/login/screens/user_image_screen_actor.h',
'browser/chromeos/login/screens/user_selection_screen.cc',
'browser/chromeos/login/screens/user_selection_screen.h',
'browser/chromeos/login/screens/wizard_screen.cc', 'browser/chromeos/login/screens/wizard_screen.cc',
'browser/chromeos/login/screens/wizard_screen.h', 'browser/chromeos/login/screens/wizard_screen.h',
'browser/chromeos/login/screens/wrong_hwid_screen.cc', 'browser/chromeos/login/screens/wrong_hwid_screen.cc',
......
...@@ -1957,8 +1957,8 @@ ...@@ -1957,8 +1957,8 @@
'browser/ui/views/uninstall_view.h', 'browser/ui/views/uninstall_view.h',
'browser/ui/views/update_recommended_message_box.cc', 'browser/ui/views/update_recommended_message_box.cc',
'browser/ui/views/update_recommended_message_box.h', 'browser/ui/views/update_recommended_message_box.h',
'browser/ui/views/validation_message_bubble_delegate.h',
'browser/ui/views/validation_message_bubble_delegate.cc', 'browser/ui/views/validation_message_bubble_delegate.cc',
'browser/ui/views/validation_message_bubble_delegate.h',
'browser/ui/views/validation_message_bubble_view.cc', 'browser/ui/views/validation_message_bubble_view.cc',
'browser/ui/views/web_contents_modal_dialog_manager_views.cc', 'browser/ui/views/web_contents_modal_dialog_manager_views.cc',
'browser/ui/views/website_settings/permission_selector_view.cc', 'browser/ui/views/website_settings/permission_selector_view.cc',
...@@ -1992,10 +1992,10 @@ ...@@ -1992,10 +1992,10 @@
'browser/ui/webui/app_list/start_page_ui.h', 'browser/ui/webui/app_list/start_page_ui.h',
'browser/ui/webui/bookmarks_ui.cc', 'browser/ui/webui/bookmarks_ui.cc',
'browser/ui/webui/bookmarks_ui.h', 'browser/ui/webui/bookmarks_ui.h',
'browser/ui/webui/certificate_viewer_webui.cc',
'browser/ui/webui/certificate_viewer_webui.h',
'browser/ui/webui/certificate_viewer_ui.cc', 'browser/ui/webui/certificate_viewer_ui.cc',
'browser/ui/webui/certificate_viewer_ui.h', 'browser/ui/webui/certificate_viewer_ui.h',
'browser/ui/webui/certificate_viewer_webui.cc',
'browser/ui/webui/certificate_viewer_webui.h',
'browser/ui/webui/chrome_web_contents_handler.cc', 'browser/ui/webui/chrome_web_contents_handler.cc',
'browser/ui/webui/chrome_web_contents_handler.h', 'browser/ui/webui/chrome_web_contents_handler.h',
'browser/ui/webui/chrome_web_ui_controller_factory.cc', 'browser/ui/webui/chrome_web_ui_controller_factory.cc',
...@@ -2067,12 +2067,12 @@ ...@@ -2067,12 +2067,12 @@
'browser/ui/webui/chromeos/login/oobe_ui.h', 'browser/ui/webui/chromeos/login/oobe_ui.h',
'browser/ui/webui/chromeos/login/reset_screen_handler.cc', 'browser/ui/webui/chromeos/login/reset_screen_handler.cc',
'browser/ui/webui/chromeos/login/reset_screen_handler.h', 'browser/ui/webui/chromeos/login/reset_screen_handler.h',
'browser/ui/webui/chromeos/login/screen_manager_handler.cc',
'browser/ui/webui/chromeos/login/screen_manager_handler.h',
'browser/ui/webui/chromeos/login/screenlock_icon_provider.cc', 'browser/ui/webui/chromeos/login/screenlock_icon_provider.cc',
'browser/ui/webui/chromeos/login/screenlock_icon_provider.h', 'browser/ui/webui/chromeos/login/screenlock_icon_provider.h',
'browser/ui/webui/chromeos/login/screenlock_icon_source.cc', 'browser/ui/webui/chromeos/login/screenlock_icon_source.cc',
'browser/ui/webui/chromeos/login/screenlock_icon_source.h', 'browser/ui/webui/chromeos/login/screenlock_icon_source.h',
'browser/ui/webui/chromeos/login/screen_manager_handler.cc',
'browser/ui/webui/chromeos/login/screen_manager_handler.h',
'browser/ui/webui/chromeos/login/signin_screen_handler.cc', 'browser/ui/webui/chromeos/login/signin_screen_handler.cc',
'browser/ui/webui/chromeos/login/signin_screen_handler.h', 'browser/ui/webui/chromeos/login/signin_screen_handler.h',
'browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc', 'browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment