summaryrefslogtreecommitdiffstats
path: root/views/focus/focus_manager.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:18:58 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:18:58 +0000
commitd766882c913b272cc2db478d7640a317d838ebad (patch)
tree99424c7a994d0d771bd4c3bdf2b196042b937b62 /views/focus/focus_manager.cc
parenteb75208190b35bedd144e102ea5cc826358bbbfd (diff)
downloadchromium_src-d766882c913b272cc2db478d7640a317d838ebad.zip
chromium_src-d766882c913b272cc2db478d7640a317d838ebad.tar.gz
chromium_src-d766882c913b272cc2db478d7640a317d838ebad.tar.bz2
Changing the KeyboardEvent to use a KeyboardCode instead of a w_char. Led to several places where I had to switch from VK_ to VKEY_.
Also cleaned-up the table view OnKeyDown method. Since TableView is a NativeControl it can use the NativeControl::OnKeyDown directly. BUG=None TEST=Make sure short-cuts works as expected, especially in the omnibox. Review URL: http://codereview.chromium.org/248010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/focus_manager.cc')
-rw-r--r--views/focus/focus_manager.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc
index dffb392..aca418b 100644
--- a/views/focus/focus_manager.cc
+++ b/views/focus/focus_manager.cc
@@ -63,7 +63,7 @@ bool FocusManager::OnKeyEvent(const KeyEvent& event) {
#endif
// Intercept arrow key messages to switch between grouped views.
- int key_code = event.GetCharacter();
+ base::KeyboardCode key_code = event.GetKeyCode();
if (focused_view_ && focused_view_->GetGroup() != -1 &&
(key_code == base::VKEY_UP || key_code == base::VKEY_DOWN ||
key_code == base::VKEY_LEFT || key_code == base::VKEY_RIGHT)) {
@@ -89,7 +89,7 @@ bool FocusManager::OnKeyEvent(const KeyEvent& event) {
// Process keyboard accelerators.
// If the key combination matches an accelerator, the accelerator is
// triggered, otherwise the key event is proceed as usual.
- Accelerator accelerator(event.GetCharacter(),
+ Accelerator accelerator(event.GetKeyCode(),
event.IsShiftDown(),
event.IsControlDown(),
event.IsAltDown());
@@ -405,7 +405,7 @@ AcceleratorTarget* FocusManager::GetCurrentTargetForAccelerator(
// static
bool FocusManager::IsTabTraversalKeyEvent(const KeyEvent& key_event) {
- return key_event.GetCharacter() == base::VKEY_TAB &&
+ return key_event.GetKeyCode() == base::VKEY_TAB &&
!key_event.IsControlDown();
}