summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 18:10:34 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 18:10:34 +0000
commit5c3e4fc722a99f457a863f3fed2fc912e94fccf9 (patch)
tree56e5ecaf7cbdfd2897f179fb00cc945eb160d6c8 /views
parentfa3fb0cad74e8eeb76547358f62dc87f8327f447 (diff)
downloadchromium_src-5c3e4fc722a99f457a863f3fed2fc912e94fccf9.zip
chromium_src-5c3e4fc722a99f457a863f3fed2fc912e94fccf9.tar.gz
chromium_src-5c3e4fc722a99f457a863f3fed2fc912e94fccf9.tar.bz2
BookmarkBarView tests fixes
* Add BOOKMARK_CONTEXT_MENU_SHOWN notification. On Linux, event handling is asynchronous, but the showing context menu is blocking, so we can't use RunAllPending(). * Convert gtk keycode to Win when checking accelerator. BUG=39736 TEST=none (interactive_ui_tests should pass once enabled it'll be enabled by http://codereview.chromium.org/1576008 Review URL: http://codereview.chromium.org/1545011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/menu_controller.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc
index 625199d..80c081d 100644
--- a/views/controls/menu/menu_controller.cc
+++ b/views/controls/menu/menu_controller.cc
@@ -18,6 +18,9 @@
#include "views/view_constants.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
+#if defined(OS_LINUX)
+#include "base/keyboard_code_conversion_gtk.h"
+#endif
using base::Time;
using base::TimeDelta;
@@ -695,7 +698,9 @@ bool MenuController::Dispatch(GdkEvent* event) {
switch (event->type) {
case GDK_KEY_PRESS: {
- if (!OnKeyDown(event->key.keyval))
+ base::KeyboardCode win_keycode =
+ base::WindowsKeyCodeForGdkKeyCode(event->key.keyval);
+ if (!OnKeyDown(win_keycode))
return false;
guint32 keycode = gdk_keyval_to_unicode(event->key.keyval);
if (keycode)
@@ -718,6 +723,7 @@ bool MenuController::OnKeyDown(int key_code
#endif
) {
DCHECK(blocking_run_);
+ DLOG(WARNING) << "OnKeyDown: " << key_code;
switch (key_code) {
case base::VKEY_UP: