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

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

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
9 #include "chrome/browser/chromeos/login/screen_locker.h" 9 #include "chrome/browser/chromeos/login/screen_locker.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void ScreenLockView::ContentsChanged(views::Textfield* sender, 191 void ScreenLockView::ContentsChanged(views::Textfield* sender,
192 const string16& new_contents) { 192 const string16& new_contents) {
193 if (!new_contents.empty()) 193 if (!new_contents.empty())
194 screen_locker_->ClearErrors(); 194 screen_locker_->ClearErrors();
195 } 195 }
196 196
197 bool ScreenLockView::HandleKeyEvent( 197 bool ScreenLockView::HandleKeyEvent(
198 views::Textfield* sender, 198 views::Textfield* sender,
199 const views::KeyEvent& key_event) { 199 const views::KeyEvent& key_event) {
200 screen_locker_->ClearErrors(); 200 screen_locker_->ClearErrors();
201 if (key_event.GetKeyCode() == ui::VKEY_RETURN) { 201 if (key_event.key_code() == ui::VKEY_RETURN) {
202 screen_locker_->Authenticate(password_field_->text()); 202 screen_locker_->Authenticate(password_field_->text());
203 return true; 203 return true;
204 } 204 }
205 return false; 205 return false;
206 } 206 }
207 207
208 void ScreenLockView::Observe( 208 void ScreenLockView::Observe(
209 NotificationType type, 209 NotificationType type,
210 const NotificationSource& source, 210 const NotificationSource& source,
211 const NotificationDetails& details) { 211 const NotificationDetails& details) {
212 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED || !user_view_) 212 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED || !user_view_)
213 return; 213 return;
214 214
215 UserManager::User* user = Details<UserManager::User>(details).ptr(); 215 UserManager::User* user = Details<UserManager::User>(details).ptr();
216 if (screen_locker_->user().email() != user->email()) 216 if (screen_locker_->user().email() != user->email())
217 return; 217 return;
218 user_view_->SetImage(user->image(), user->image()); 218 user_view_->SetImage(user->image(), user->image());
219 } 219 }
220 220
221 } // namespace chromeos 221 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698