diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 19:54:58 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 19:54:58 +0000 |
commit | 0cc3dfe387313821853e658a6e2fb3b729eac9e5 (patch) | |
tree | 6bdf4d23c62ae78cafc6e7c5a2599cce70dfef22 /views/widget | |
parent | 3c70591cc7d0d8cc162c10f7d3ac3b2ac15e4e69 (diff) | |
download | chromium_src-0cc3dfe387313821853e658a6e2fb3b729eac9e5.zip chromium_src-0cc3dfe387313821853e658a6e2fb3b729eac9e5.tar.gz chromium_src-0cc3dfe387313821853e658a6e2fb3b729eac9e5.tar.bz2 |
Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from base/ to app/.
Also moves the associated classes/enums from base:: to app::.
TEST=try bots compile
BUG=NONE
Review URL: http://codereview.chromium.org/3165064
TBR=bryeung@chromium.org
TBR=phajdan.jr@chromium.org
Review URL: http://codereview.chromium.org/3361003
TBR=bryeung@chromium.org
Review URL: http://codereview.chromium.org/3337006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/root_view.cc | 6 | ||||
-rw-r--r-- | views/widget/widget_gtk.cc | 10 | ||||
-rw-r--r-- | views/widget/widget_win.cc | 5 |
3 files changed, 10 insertions, 11 deletions
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc index 20464cc..a56ec99 100644 --- a/views/widget/root_view.cc +++ b/views/widget/root_view.cc @@ -7,7 +7,7 @@ #include <algorithm> #include "app/drag_drop_types.h" -#include "app/keyboard_codes.h" +#include "base/keyboard_codes.h" #include "base/logging.h" #include "base/message_loop.h" #include "gfx/canvas_skia.h" @@ -581,8 +581,8 @@ bool RootView::ProcessKeyEvent(const KeyEvent& event) { View* v = GetFocusedView(); // Special case to handle right-click context menus triggered by the // keyboard. - if (v && v->IsEnabled() && ((event.GetKeyCode() == app::VKEY_APPS) || - (event.GetKeyCode() == app::VKEY_F10 && event.IsShiftDown()))) { + if (v && v->IsEnabled() && ((event.GetKeyCode() == base::VKEY_APPS) || + (event.GetKeyCode() == base::VKEY_F10 && event.IsShiftDown()))) { v->ShowContextMenu(v->GetKeyboardContextMenuLocation(), false); return true; } diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 67d542f..0a129f6 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -884,21 +884,21 @@ bool WidgetGtk::HandleKeyboardEvent(GdkEventKey* event) { // VKEY_MENU key release event. It ensures that VKEY_MENU accelerator can only // be activated when handling a VKEY_MENU key release event which is preceded // by an unhandled VKEY_MENU key press event. - if (key_code != app::VKEY_MENU || event->type != GDK_KEY_RELEASE) + if (key_code != base::VKEY_MENU || event->type != GDK_KEY_RELEASE) should_handle_menu_key_release_ = false; if (event->type == GDK_KEY_PRESS) { // VKEY_MENU is triggered by key release event. // FocusManager::OnKeyEvent() returns false when the key has been consumed. - if (key_code != app::VKEY_MENU) + if (key_code != base::VKEY_MENU) handled = !focus_manager_->OnKeyEvent(key); else should_handle_menu_key_release_ = true; - } else if (key_code == app::VKEY_MENU && should_handle_menu_key_release_ && + } else if (key_code == base::VKEY_MENU && should_handle_menu_key_release_ && (key.GetFlags() & ~Event::EF_ALT_DOWN) == 0) { // Trigger VKEY_MENU when only this key is pressed and released, and both // press and release events are not handled by others. - Accelerator accelerator(app::VKEY_MENU, false, false, false); + Accelerator accelerator(base::VKEY_MENU, false, false, false); handled = focus_manager_->ProcessAccelerator(accelerator); } @@ -1167,7 +1167,7 @@ gboolean WidgetGtk::OnKeyEvent(GtkWidget* widget, GdkEventKey* event) { // VKEY_MENU key release event. It ensures that VKEY_MENU accelerator can only // be activated when handling a VKEY_MENU key release event which is preceded // by an unhandled VKEY_MENU key press event. See also HandleKeyboardEvent(). - if (key.GetKeyCode() != app::VKEY_MENU || event->type != GDK_KEY_RELEASE) + if (key.GetKeyCode() != base::VKEY_MENU || event->type != GDK_KEY_RELEASE) should_handle_menu_key_release_ = false; bool handled = false; diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index ec0121a..f11031c 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -4,7 +4,6 @@ #include "views/widget/widget_win.h" -#include "app/keyboard_code_conversion_win.h" #include "app/l10n_util_win.h" #include "app/system_monitor.h" #include "app/win_util.h" @@ -673,7 +672,7 @@ void WidgetWin::OnInitMenuPopup(HMENU menu, } void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) { - KeyEvent event(Event::ET_KEY_PRESSED, app::KeyboardCodeForWindowsKeyCode(c), + KeyEvent event(Event::ET_KEY_PRESSED, win_util::WinToKeyboardCode(c), KeyEvent::GetKeyStateFlags(), rep_cnt, flags); RootView* root_view = GetFocusedViewRootView(); if (!root_view) @@ -683,7 +682,7 @@ void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) { } void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) { - KeyEvent event(Event::ET_KEY_RELEASED, app::KeyboardCodeForWindowsKeyCode(c), + KeyEvent event(Event::ET_KEY_RELEASED, win_util::WinToKeyboardCode(c), KeyEvent::GetKeyStateFlags(), rep_cnt, flags); RootView* root_view = GetFocusedViewRootView(); if (!root_view) |