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

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

Issue 3165064: Move the keyboard files from base/ to app/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: latest merge Created 10 years, 4 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 void ScreenLockView::OnSignout() { 179 void ScreenLockView::OnSignout() {
180 screen_locker_->Signout(); 180 screen_locker_->Signout();
181 } 181 }
182 182
183 bool ScreenLockView::HandleKeystroke( 183 bool ScreenLockView::HandleKeystroke(
184 views::Textfield* sender, 184 views::Textfield* sender,
185 const views::Textfield::Keystroke& keystroke) { 185 const views::Textfield::Keystroke& keystroke) {
186 screen_locker_->ClearErrors(); 186 screen_locker_->ClearErrors();
187 if (keystroke.GetKeyboardCode() == base::VKEY_RETURN) { 187 if (keystroke.GetKeyboardCode() == app::VKEY_RETURN) {
188 screen_locker_->Authenticate(password_field_->text()); 188 screen_locker_->Authenticate(password_field_->text());
189 return true; 189 return true;
190 } 190 }
191 return false; 191 return false;
192 } 192 }
193 193
194 void ScreenLockView::Observe( 194 void ScreenLockView::Observe(
195 NotificationType type, 195 NotificationType type,
196 const NotificationSource& source, 196 const NotificationSource& source,
197 const NotificationDetails& details) { 197 const NotificationDetails& details) {
198 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED || !user_view_) 198 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED || !user_view_)
199 return; 199 return;
200 200
201 UserManager::User* user = Details<UserManager::User>(details).ptr(); 201 UserManager::User* user = Details<UserManager::User>(details).ptr();
202 if (screen_locker_->user().email() != user->email()) 202 if (screen_locker_->user().email() != user->email())
203 return; 203 return;
204 204
205 user_view_->SetImage(user->image()); 205 user_view_->SetImage(user->image());
206 } 206 }
207 207
208 } // namespace chromeos 208 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/password_changed_view.cc ('k') | chrome/browser/chromeos/login/screen_locker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698