diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 21:32:30 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 21:32:30 +0000 |
commit | a4d271ecbea5ed763d49919fac7bfabe788832f6 (patch) | |
tree | c646a4d085142007968138c7ad26d1fb2aafe6a9 /views/focus | |
parent | 19ff283d0e043c59206fdc2e890a2780933849fe (diff) | |
download | chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.zip chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.tar.gz chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.tar.bz2 |
Reverting 27412 it breaks the toolkit views Linux build.
TBR=sky
Review URL: http://codereview.chromium.org/254005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/accelerator_handler_win.cc | 4 | ||||
-rw-r--r-- | views/focus/focus_manager.cc | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/views/focus/accelerator_handler_win.cc b/views/focus/accelerator_handler_win.cc index 8363928..eb8bfb9 100644 --- a/views/focus/accelerator_handler_win.cc +++ b/views/focus/accelerator_handler_win.cc @@ -4,8 +4,6 @@ #include "views/focus/accelerator_handler.h" -#include "base/keyboard_codes.h" -#include "base/win_util.h" #include "views/event.h" #include "views/focus/focus_manager.h" @@ -25,7 +23,7 @@ bool AcceleratorHandler::Dispatch(const MSG& msg) { case WM_KEYDOWN: case WM_SYSKEYDOWN: { KeyEvent event(Event::ET_KEY_PRESSED, - win_util::WinToKeyboardCode(msg.wParam), + msg.wParam, msg.lParam & 0xFFFF, (msg.lParam & 0xFFFF0000) >> 16); process_message = focus_manager->OnKeyEvent(event); diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc index aca418b..dffb392 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. - base::KeyboardCode key_code = event.GetKeyCode(); + int key_code = event.GetCharacter(); 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.GetKeyCode(), + Accelerator accelerator(event.GetCharacter(), event.IsShiftDown(), event.IsControlDown(), event.IsAltDown()); @@ -405,7 +405,7 @@ AcceleratorTarget* FocusManager::GetCurrentTargetForAccelerator( // static bool FocusManager::IsTabTraversalKeyEvent(const KeyEvent& key_event) { - return key_event.GetKeyCode() == base::VKEY_TAB && + return key_event.GetCharacter() == base::VKEY_TAB && !key_event.IsControlDown(); } |