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

Side by Side Diff: chrome/browser/chromeos/login/screen_lock_view.cc

Issue 3361003: Revert 58215 - Revert 58186 - Move the keyboard files from base/ to app/.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/screen_lock_view.h" 5 #include "chrome/browser/chromeos/login/screen_lock_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/login/helper.h" 10 #include "chrome/browser/chromeos/login/helper.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 void ScreenLockView::OnSignout() { 197 void ScreenLockView::OnSignout() {
198 screen_locker_->Signout(); 198 screen_locker_->Signout();
199 } 199 }
200 200
201 bool ScreenLockView::HandleKeystroke( 201 bool ScreenLockView::HandleKeystroke(
202 views::Textfield* sender, 202 views::Textfield* sender,
203 const views::Textfield::Keystroke& keystroke) { 203 const views::Textfield::Keystroke& keystroke) {
204 screen_locker_->ClearErrors(); 204 screen_locker_->ClearErrors();
205 if (keystroke.GetKeyboardCode() == base::VKEY_RETURN) { 205 if (keystroke.GetKeyboardCode() == app::VKEY_RETURN) {
206 screen_locker_->Authenticate(password_field_->text()); 206 screen_locker_->Authenticate(password_field_->text());
207 return true; 207 return true;
208 } 208 }
209 return false; 209 return false;
210 } 210 }
211 211
212 void ScreenLockView::Observe( 212 void ScreenLockView::Observe(
213 NotificationType type, 213 NotificationType type,
214 const NotificationSource& source, 214 const NotificationSource& source,
215 const NotificationDetails& details) { 215 const NotificationDetails& details) {
216 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED || !user_view_) 216 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED || !user_view_)
217 return; 217 return;
218 218
219 UserManager::User* user = Details<UserManager::User>(details).ptr(); 219 UserManager::User* user = Details<UserManager::User>(details).ptr();
220 if (screen_locker_->user().email() != user->email()) 220 if (screen_locker_->user().email() != user->email())
221 return; 221 return;
222 222
223 user_view_->SetImage(user->image()); 223 user_view_->SetImage(user->image());
224 } 224 }
225 225
226 } // namespace chromeos 226 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/password_changed_view.cc ('k') | chrome/browser/chromeos/login/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698