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

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_display.cc

Issue 289013002: cros: Clean up screenlockPrivate plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 5 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
10 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 10 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (chromeos::LoginDisplayHost* host = 119 if (chromeos::LoginDisplayHost* host =
120 chromeos::LoginDisplayHostImpl::default_host()) { 120 chromeos::LoginDisplayHostImpl::default_host()) {
121 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView()) 121 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView())
122 login_view->SetUIEnabled(is_enabled); 122 login_view->SetUIEnabled(is_enabled);
123 } 123 }
124 } 124 }
125 125
126 void WebUILoginDisplay::SelectPod(int index) { 126 void WebUILoginDisplay::SelectPod(int index) {
127 } 127 }
128 128
129 void WebUILoginDisplay::ShowBannerMessage(const std::string& message) {
130 if (!webui_handler_)
131 return;
132 webui_handler_->ShowBannerMessage(message);
133 }
134
135 void WebUILoginDisplay::ShowUserPodButton(
136 const std::string& username,
137 const std::string& iconURL,
138 const base::Closure& click_callback) {
139 if (!webui_handler_)
140 return;
141 webui_handler_->ShowUserPodButton(username, iconURL, click_callback);
142 }
143
144 void WebUILoginDisplay::HideUserPodButton(const std::string& username) {
145 if (!webui_handler_)
146 return;
147 webui_handler_->HideUserPodButton(username);
148 }
149
150 void WebUILoginDisplay::SetAuthType(const std::string& username,
151 AuthType auth_type,
152 const std::string& initial_value) {
153 if (!webui_handler_)
154 return;
155 webui_handler_->SetAuthType(username, auth_type, initial_value);
156 }
157
158 LoginDisplay::AuthType WebUILoginDisplay::GetAuthType(
159 const std::string& username) const {
160 // Return default auth type if WebUI hander is not ready.
161 if (!webui_handler_)
162 return OFFLINE_PASSWORD;
163 return webui_handler_->GetAuthType(username);
164 }
165
166 void WebUILoginDisplay::ShowError(int error_msg_id, 129 void WebUILoginDisplay::ShowError(int error_msg_id,
167 int login_attempts, 130 int login_attempts,
168 HelpAppLauncher::HelpTopic help_topic_id) { 131 HelpAppLauncher::HelpTopic help_topic_id) {
169 VLOG(1) << "Show error, error_id: " << error_msg_id 132 VLOG(1) << "Show error, error_id: " << error_msg_id
170 << ", attempts:" << login_attempts 133 << ", attempts:" << login_attempts
171 << ", help_topic_id: " << help_topic_id; 134 << ", help_topic_id: " << help_topic_id;
172 if (!webui_handler_) 135 if (!webui_handler_)
173 return; 136 return;
174 137
175 std::string error_text; 138 std::string error_text;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, 383 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this,
421 &WebUILoginDisplay::OnPasswordClearTimerExpired); 384 &WebUILoginDisplay::OnPasswordClearTimerExpired);
422 } 385 }
423 386
424 void WebUILoginDisplay::OnPasswordClearTimerExpired() { 387 void WebUILoginDisplay::OnPasswordClearTimerExpired() {
425 if (webui_handler_) 388 if (webui_handler_)
426 webui_handler_->ClearUserPodPassword(); 389 webui_handler_->ClearUserPodPassword();
427 } 390 }
428 391
429 } // namespace chromeos 392 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698