diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-09 23:28:06 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-09 23:28:06 +0000 |
commit | e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c (patch) | |
tree | 05402030dd11561f128734a8df6e2e6a848fc366 /views/focus | |
parent | 6e472da04f540d7837b7a344383869013bc57a3d (diff) | |
download | chromium_src-e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c.zip chromium_src-e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c.tar.gz chromium_src-e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c.tar.bz2 |
Migrate Event API methods to Google Style.
BUG=72040
TEST=none
Review URL: http://codereview.chromium.org/6480001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/focus_manager.cc | 7 | ||||
-rw-r--r-- | views/focus/focus_manager_unittest.cc | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc index d217e63..5e5b2f4 100644 --- a/views/focus/focus_manager.cc +++ b/views/focus/focus_manager.cc @@ -120,7 +120,7 @@ bool FocusManager::OnKeyEvent(const KeyEvent& event) { #endif // Intercept arrow key messages to switch between grouped views. - ui::KeyboardCode key_code = event.GetKeyCode(); + ui::KeyboardCode key_code = event.key_code(); if (focused_view_ && focused_view_->GetGroup() != -1 && (key_code == ui::VKEY_UP || key_code == ui::VKEY_DOWN || key_code == ui::VKEY_LEFT || key_code == ui::VKEY_RIGHT)) { @@ -146,7 +146,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 processed as usual. - Accelerator accelerator(event.GetKeyCode(), + Accelerator accelerator(event.key_code(), event.IsShiftDown(), event.IsControlDown(), event.IsAltDown()); @@ -509,8 +509,7 @@ AcceleratorTarget* FocusManager::GetCurrentTargetForAccelerator( // static bool FocusManager::IsTabTraversalKeyEvent(const KeyEvent& key_event) { - return key_event.GetKeyCode() == ui::VKEY_TAB && - !key_event.IsControlDown(); + return key_event.key_code() == ui::VKEY_TAB && !key_event.IsControlDown(); } void FocusManager::ViewRemoved(View* parent, View* removed) { diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc index bd21c16..457ed09 100644 --- a/views/focus/focus_manager_unittest.cc +++ b/views/focus/focus_manager_unittest.cc @@ -1448,12 +1448,12 @@ class MessageTrackingView : public View { } virtual bool OnKeyPressed(const KeyEvent& e) { - keys_pressed_.push_back(e.GetKeyCode()); + keys_pressed_.push_back(e.key_code()); return true; } virtual bool OnKeyReleased(const KeyEvent& e) { - keys_released_.push_back(e.GetKeyCode()); + keys_released_.push_back(e.key_code()); return true; } |