Chromium Code Reviews| Index: ui/views/controls/menu/menu_controller.cc |
| diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc |
| index a1438fbae8c5f9b9eef965cd06559972e1aaafad..44d13f500a6bee00f054d722d4700090abba3c91 100644 |
| --- a/ui/views/controls/menu/menu_controller.cc |
| +++ b/ui/views/controls/menu/menu_controller.cc |
| @@ -890,7 +890,6 @@ bool MenuController::Dispatch(const MSG& msg) { |
| } |
| case WM_CHAR: |
| return !SelectByChar(static_cast<char16>(msg.wParam)); |
| - |
| case WM_KEYUP: |
| return true; |
| @@ -914,34 +913,25 @@ bool MenuController::Dispatch(const MSG& msg) { |
| return exit_type_ == EXIT_NONE; |
| } |
| #elif defined(USE_AURA) |
| -base::MessagePumpDispatcher::DispatchStatus |
| - MenuController::Dispatch(XEvent* xev) { |
| +bool MenuController::Dispatch(const base::NativeEvent& xev) { |
|
sky
2012/04/09 14:38:59
xev -> event
oshima
2012/04/09 17:56:09
Done.
|
| if (exit_type_ == EXIT_ALL || exit_type_ == EXIT_DESTROYED) { |
| aura::Env::GetInstance()->GetDispatcher()->Dispatch(xev); |
| - return base::MessagePumpDispatcher::EVENT_QUIT; |
| + return false; |
| } |
| switch (ui::EventTypeFromNative(xev)) { |
| case ui::ET_KEY_PRESSED: |
| if (!OnKeyDown(ui::KeyboardCodeFromNative(xev))) |
| - return base::MessagePumpDispatcher::EVENT_QUIT; |
| + return false; |
| - return SelectByChar(ui::KeyboardCodeFromNative(xev)) ? |
| - base::MessagePumpDispatcher::EVENT_QUIT : |
| - base::MessagePumpDispatcher::EVENT_PROCESSED; |
| + return !SelectByChar(ui::KeyboardCodeFromNative(xev)); |
| case ui::ET_KEY_RELEASED: |
| - return base::MessagePumpDispatcher::EVENT_PROCESSED; |
| + return true; |
| default: |
| break; |
| } |
| - // TODO(oshima): Update Windows' Dispatcher to return DispatchStatus |
| - // instead of bool. |
| - if (aura::Env::GetInstance()->GetDispatcher()->Dispatch(xev) == |
| - base::MessagePumpDispatcher::EVENT_IGNORED) |
| - return EVENT_IGNORED; |
| - return exit_type_ != EXIT_NONE ? |
| - base::MessagePumpDispatcher::EVENT_QUIT : |
| - base::MessagePumpDispatcher::EVENT_PROCESSED; |
| + aura::Env::GetInstance()->GetDispatcher()->Dispatch(xev); |
| + return exit_type_ == EXIT_NONE; |
| } |
| #endif |