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/controls/textfield | |
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/controls/textfield')
-rw-r--r-- | views/controls/textfield/native_textfield_win.cc | 7 | ||||
-rw-r--r-- | views/controls/textfield/textfield.cc | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/views/controls/textfield/native_textfield_win.cc b/views/controls/textfield/native_textfield_win.cc index d027156..1872492 100644 --- a/views/controls/textfield/native_textfield_win.cc +++ b/views/controls/textfield/native_textfield_win.cc @@ -9,7 +9,6 @@ #include "app/win_util.h" #include "base/clipboard.h" #include "base/gfx/native_theme.h" -#include "base/keyboard_codes.h" #include "base/scoped_clipboard_writer.h" #include "base/string_util.h" #include "base/win_util.h" @@ -253,13 +252,13 @@ bool NativeTextfieldWin::GetAcceleratorForCommandId(int command_id, // anywhere so we need to check for them explicitly here. switch (command_id) { case IDS_APP_CUT: - *accelerator = views::Accelerator(base::VKEY_X, false, true, false); + *accelerator = views::Accelerator(L'X', false, true, false); return true; case IDS_APP_COPY: - *accelerator = views::Accelerator(base::VKEY_C, false, true, false); + *accelerator = views::Accelerator(L'C', false, true, false); return true; case IDS_APP_PASTE: - *accelerator = views::Accelerator(base::VKEY_V, false, true, false); + *accelerator = views::Accelerator(L'V', false, true, false); return true; } return container_view_->GetWidget()->GetAccelerator(command_id, accelerator); diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc index bf12e42..368e7fd 100644 --- a/views/controls/textfield/textfield.cc +++ b/views/controls/textfield/textfield.cc @@ -14,7 +14,6 @@ #include "base/win_util.h" #endif -#include "base/keyboard_codes.h" #include "base/string_util.h" #include "views/controls/textfield/native_textfield_wrapper.h" #include "views/widget/widget.h" @@ -222,14 +221,14 @@ bool Textfield::SkipDefaultKeyEventProcessing(const KeyEvent& e) { #if defined(OS_WIN) // TODO(hamaji): Figure out which keyboard combinations we need to add here, // similar to LocationBarView::SkipDefaultKeyEventProcessing. - base::KeyboardCode key = e.GetKeyCode(); - if (key == base::VKEY_BACK) + const int c = e.GetCharacter(); + if (c == VK_BACK) return true; // We'll handle BackSpace ourselves. // We don't translate accelerators for ALT + NumPad digit, they are used for // entering special characters. We do translate alt-home. - if (e.IsAltDown() && (key != base::VKEY_HOME) && - win_util::IsNumPadDigit(key, e.IsExtendedKey())) + if (e.IsAltDown() && (c != VK_HOME) && + win_util::IsNumPadDigit(c, e.IsExtendedKey())) return true; #endif return false; |