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

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

Issue 7015024: Converted from DOM to WebUI for new login method (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rewrote CL to reference new implementation of WebUI Login Screen Created 9 years, 7 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/dom_login_display.cc b/chrome/browser/chromeos/login/webui_login_display.cc
similarity index 56%
rename from chrome/browser/chromeos/login/dom_login_display.cc
rename to chrome/browser/chromeos/login/webui_login_display.cc
index 4eb7a4c919213576401a4dc51e8387c592644329..7751d9d2b74954e35935b97ed7109dec678177fe 100644
--- a/chrome/browser/chromeos/login/dom_login_display.cc
+++ b/chrome/browser/chromeos/login/webui_login_display.cc
@@ -2,7 +2,7 @@
// 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/dom_login_display.h"
+#include "chrome/browser/chromeos/login/webui_login_display.h"
#include "chrome/browser/chromeos/wm_ipc.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -15,32 +15,32 @@ const char kLoginURL[] = "chrome://login";
namespace chromeos {
-// DOMLoginDisplay, public: ---------------------------------------------------
+// WebUILoginDisplay, public: --------------------------------------------------
-DOMLoginDisplay::~DOMLoginDisplay() {
+WebUILoginDisplay::~WebUILoginDisplay() {
if (webui_login_window_)
webui_login_window_->Close();
}
-// DOMLoginDisplay, Singleton implementation: ----------------------------------
+// WebUILoginDisplay, Singleton implementation: --------------------------------
// static
-DOMLoginDisplay* DOMLoginDisplay::GetInstance() {
- return Singleton<DOMLoginDisplay>::get();
+WebUILoginDisplay* WebUILoginDisplay::GetInstance() {
+ return Singleton<WebUILoginDisplay>::get();
}
// LoginDisplay implementation: ------------------------------------------------
// static
-views::Widget* DOMLoginDisplay::GetLoginWindow() {
- return DOMLoginDisplay::GetInstance()->LoginWindow();
+views::Widget* WebUILoginDisplay::GetLoginWindow() {
+ return WebUILoginDisplay::GetInstance()->LoginWindow();
}
-views::Widget* DOMLoginDisplay::LoginWindow() {
+views::Widget* WebUILoginDisplay::LoginWindow() {
return webui_login_window_;
}
-void DOMLoginDisplay::Destroy() {
+void WebUILoginDisplay::Destroy() {
background_bounds_ = gfx::Rect();
delegate_ = NULL;
@@ -51,9 +51,9 @@ void DOMLoginDisplay::Destroy() {
webui_login_view_ = NULL;
}
-void DOMLoginDisplay::Init(const std::vector<UserManager::User>& users,
- bool show_guest,
- bool show_new_user) {
+void WebUILoginDisplay::Init(const std::vector<UserManager::User>& users,
+ bool show_guest,
+ bool show_new_user) {
// Testing that the delegate has been set.
DCHECK(delegate_);
users_ = users;
@@ -67,24 +67,24 @@ void DOMLoginDisplay::Init(const std::vector<UserManager::User>& users,
webui_login_window_->Show();
}
-void DOMLoginDisplay::OnBeforeUserRemoved(const std::string& username) {
+void WebUILoginDisplay::OnBeforeUserRemoved(const std::string& username) {
// TODO(rharrison): Figure out if I need to split anything between this and
// OnUserRemoved
}
-void DOMLoginDisplay::OnUserImageChanged(UserManager::User* user) {
+void WebUILoginDisplay::OnUserImageChanged(UserManager::User* user) {
// TODO(rharrison): Update the user in the user vector
- // TODO(rharrison): Push the change to DOM Login screen
+ // TODO(rharrison): Push the change to WebUI Login screen
}
-void DOMLoginDisplay::OnUserRemoved(const std::string& username) {
+void WebUILoginDisplay::OnUserRemoved(const std::string& username) {
// TODO(rharrison): Remove the user from the user vector
- // TODO(rharrison): Push the change to DOM Login screen
+ // TODO(rharrison): Push the change to WebUI Login screen
}
-void DOMLoginDisplay::OnFadeOut() { }
+void WebUILoginDisplay::OnFadeOut() { }
-void DOMLoginDisplay::SetUIEnabled(bool is_enabled) {
+void WebUILoginDisplay::SetUIEnabled(bool is_enabled) {
// Send message to WM to enable/disable click on windows.
WmIpc::Message message(WM_IPC_MESSAGE_WM_SET_LOGIN_STATE);
message.set_param(0, is_enabled);
@@ -94,30 +94,30 @@ void DOMLoginDisplay::SetUIEnabled(bool is_enabled) {
login_handler_->ClearAndEnablePassword();
}
-void DOMLoginDisplay::ShowError(int error_msg_id,
- int login_attempts,
- HelpAppLauncher::HelpTopic help_topic_id) {
+void WebUILoginDisplay::ShowError(int error_msg_id,
+ int login_attempts,
+ HelpAppLauncher::HelpTopic help_topic_id) {
// TODO(rharrison): Figure out what we should be doing here
}
-// DOMLoginDisplay, LoginUIHandlerDelegate implementation: ---------------------
+// WebUILoginDisplay, LoginUIHandlerDelegate implementation: -------------------
-void DOMLoginDisplay::Login(const std::string& username,
- const std::string& password) {
+void WebUILoginDisplay::Login(const std::string& username,
+ const std::string& password) {
DCHECK(delegate_);
delegate_->Login(username, password);
}
-void DOMLoginDisplay::LoginAsGuest() {
+void WebUILoginDisplay::LoginAsGuest() {
DCHECK(delegate_);
delegate_->LoginAsGuest();
}
-// DOMLoginDisplay, private: ---------------------------------------------------
+// WebUILoginDisplay, private: -------------------------------------------------
// Singleton implementation: ---------------------------------------------------
-DOMLoginDisplay::DOMLoginDisplay()
+WebUILoginDisplay::WebUILoginDisplay()
: LoginDisplay(NULL, gfx::Rect()),
LoginUIHandlerDelegate(),
webui_login_view_(NULL),

Powered by Google App Engine
This is Rietveld 408576698