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

Unified Diff: chrome/browser/chromeos/login/webui_login_view.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
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | chrome/browser/chromeos/setting_level_bubble.cc » ('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 f61d95f1f140c57b70f0ae9a4cc102f380aec950..36020ec4e3d75ff2d30d3058e63fbe7caa26ee6b 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -113,6 +113,7 @@ const int WebUILoginView::kStatusAreaCornerPadding = 5;
WebUILoginView::WebUILoginView()
: status_area_(NULL),
webui_login_(NULL),
+ login_window_(NULL),
status_window_(NULL),
host_window_frozen_(false),
status_area_visibility_on_init_(true) {
@@ -137,8 +138,8 @@ WebUILoginView::~WebUILoginView() {
status_window_ = NULL;
}
-void WebUILoginView::Init() {
-
+void WebUILoginView::Init(views::Widget* login_window) {
+ login_window_ = login_window;
webui_login_ = new DOMView();
AddChildView(webui_login_);
webui_login_->Init(ProfileManager::GetDefaultProfile(), NULL);
@@ -337,7 +338,6 @@ void WebUILoginView::InitStatusArea() {
status_area_->Init();
status_area_->SetVisible(status_area_visibility_on_init_);
- views::Widget* login_window = GetLoginWindow();
// Width of |status_window| is meant to be large enough.
// The current value of status_area_->GetPreferredSize().width()
// will be too small when button status is changed.
@@ -361,7 +361,7 @@ void WebUILoginView::InitStatusArea() {
#endif
widget_params.bounds = widget_bounds;
widget_params.transparent = true;
- widget_params.parent_widget = login_window;
+ widget_params.parent_widget = login_window_;
status_window_ = new views::Widget;
status_window_->Init(widget_params);
@@ -422,8 +422,4 @@ void WebUILoginView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors");
}
-views::Widget* WebUILoginView::GetLoginWindow() {
- return WebUILoginDisplay::GetLoginWindow();
-}
-
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | chrome/browser/chromeos/setting_level_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698