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

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

Issue 3337006: Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from bas... (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/existing_user_view.h" 5 #include "chrome/browser/chromeos/login/existing_user_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/chromeos/login/helper.h" 8 #include "chrome/browser/chromeos/login/helper.h"
9 #include "chrome/browser/chromeos/login/user_controller.h" 9 #include "chrome/browser/chromeos/login/user_controller.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 27 matching lines...) Expand all
38 // Textfield with custom processing for Tab/Shift+Tab to select entries. 38 // Textfield with custom processing for Tab/Shift+Tab to select entries.
39 class UserEntryTextfield : public views::Textfield { 39 class UserEntryTextfield : public views::Textfield {
40 public: 40 public:
41 UserEntryTextfield(UserController* controller, 41 UserEntryTextfield(UserController* controller,
42 views::Textfield::StyleFlags style) 42 views::Textfield::StyleFlags style)
43 : Textfield(style), 43 : Textfield(style),
44 controller_(controller) {} 44 controller_(controller) {}
45 45
46 // Overridden from View: 46 // Overridden from View:
47 virtual bool OnKeyPressed(const views::KeyEvent& e) { 47 virtual bool OnKeyPressed(const views::KeyEvent& e) {
48 if (e.GetKeyCode() == app::VKEY_TAB) { 48 if (e.GetKeyCode() == base::VKEY_TAB) {
49 int index = controller_->user_index() + (e.IsShiftDown() ? -1 : 1); 49 int index = controller_->user_index() + (e.IsShiftDown() ? -1 : 1);
50 controller_->SelectUser(index); 50 controller_->SelectUser(index);
51 return true; 51 return true;
52 } else { 52 } else {
53 return false; 53 return false;
54 } 54 }
55 } 55 }
56 56
57 // Overridden from views::Textfield: 57 // Overridden from views::Textfield:
58 virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { 58 virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
59 if (e.GetKeyCode() == app::VKEY_TAB) 59 if (e.GetKeyCode() == base::VKEY_TAB)
60 return true; 60 return true;
61 else 61 else
62 return views::Textfield::SkipDefaultKeyEventProcessing(e); 62 return views::Textfield::SkipDefaultKeyEventProcessing(e);
63 } 63 }
64 64
65 private: 65 private:
66 UserController* controller_; 66 UserController* controller_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(UserEntryTextfield); 68 DISALLOW_COPY_AND_ASSIGN(UserEntryTextfield);
69 }; 69 };
(...skipping 19 matching lines...) Expand all
89 GridLayout::USE_PREF, 0, 0); 89 GridLayout::USE_PREF, 0, 0);
90 layout->StartRow(0, 0); 90 layout->StartRow(0, 0);
91 layout->AddView(password_field_); 91 layout->AddView(password_field_);
92 layout->AddView(submit_button_); 92 layout->AddView(submit_button_);
93 SetLayoutManager(layout); 93 SetLayoutManager(layout);
94 layout->Layout(this); 94 layout->Layout(this);
95 SchedulePaint(); 95 SchedulePaint();
96 } 96 }
97 97
98 } // namespace chromeos 98 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/browser_keyevents_browsertest.cc ('k') | chrome/browser/chromeos/login/new_user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698