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

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

Issue 8395042: [cros,de-hack] Get rid of singleton for the WebUILoginScreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment nit Created 9 years, 2 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
Index: chrome/browser/chromeos/login/webui_login_display.cc
diff --git a/chrome/browser/chromeos/login/webui_login_display.cc b/chrome/browser/chromeos/login/webui_login_display.cc
index 679a5c3713d36f72032bc10ad77962b8f7e3b4e9..01234376651f407f5f9bc3379e900e8ac0d94354 100644
--- a/chrome/browser/chromeos/login/webui_login_display.cc
+++ b/chrome/browser/chromeos/login/webui_login_display.cc
@@ -25,27 +25,13 @@ namespace chromeos {
WebUILoginDisplay::~WebUILoginDisplay() {
}
-// WebUILoginDisplay, Singleton implementation: --------------------------------
-
-// static
-WebUILoginDisplay* WebUILoginDisplay::GetInstance() {
- return Singleton<WebUILoginDisplay>::get();
-}
-
// LoginDisplay implementation: ------------------------------------------------
-// static
-views::Widget* WebUILoginDisplay::GetLoginWindow() {
- return WebUILoginDisplay::GetInstance()->LoginWindow();
-}
-
-views::Widget* WebUILoginDisplay::LoginWindow() {
- return login_window_;
-}
-
-void WebUILoginDisplay::Destroy() {
- background_bounds_ = gfx::Rect();
- delegate_ = NULL;
+WebUILoginDisplay::WebUILoginDisplay(LoginDisplay::Delegate* delegate)
+ : LoginDisplay(delegate, gfx::Rect()),
+ show_guest_(false),
+ show_new_user_(false),
+ webui_handler_(NULL) {
}
void WebUILoginDisplay::Init(const std::vector<UserManager::User>& users,
@@ -204,16 +190,17 @@ void WebUILoginDisplay::ShowSigninScreenForCreds(
webui_handler_->ShowSigninScreenForCreds(username, password);
}
-// WebUILoginDisplay, private: -------------------------------------------------
-// Singleton implementation: ---------------------------------------------------
+const std::vector<UserManager::User>& WebUILoginDisplay::GetUsers() const {
+ return users_;
+}
-WebUILoginDisplay::WebUILoginDisplay()
- : LoginDisplay(NULL, gfx::Rect()),
- show_guest_(false),
- show_new_user_(false),
- login_window_(NULL),
- webui_handler_(NULL) {
+bool WebUILoginDisplay::IsShowGuest() const {
+ return show_guest_;
+}
+
+bool WebUILoginDisplay::IsShowNewUser() const {
+ return show_new_user_;
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_display.h ('k') | chrome/browser/chromeos/login/webui_login_display_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698