| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "views/controls/menu/menu_controller.h" | 5 #include "views/controls/menu/menu_controller.h" |
| 6 | 6 |
| 7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 DispatchMessage(&msg); | 870 DispatchMessage(&msg); |
| 871 return exit_type_ == EXIT_NONE; | 871 return exit_type_ == EXIT_NONE; |
| 872 } | 872 } |
| 873 #elif defined(USE_WAYLAND) | 873 #elif defined(USE_WAYLAND) |
| 874 base::MessagePumpDispatcher::DispatchStatus | 874 base::MessagePumpDispatcher::DispatchStatus |
| 875 MenuController::Dispatch(ui::WaylandEvent* ev) { | 875 MenuController::Dispatch(ui::WaylandEvent* ev) { |
| 876 return exit_type_ != EXIT_NONE ? | 876 return exit_type_ != EXIT_NONE ? |
| 877 base::MessagePumpDispatcher::EVENT_QUIT : | 877 base::MessagePumpDispatcher::EVENT_QUIT : |
| 878 base::MessagePumpDispatcher::EVENT_PROCESSED; | 878 base::MessagePumpDispatcher::EVENT_PROCESSED; |
| 879 } | 879 } |
| 880 #elif defined(USE_AURA) |
| 881 base::MessagePumpDispatcher::DispatchStatus |
| 882 MenuController::Dispatch(XEvent* xev) { |
| 883 NOTREACHED(); |
| 884 return EVENT_PROCESSED; |
| 885 } |
| 880 #elif defined(TOUCH_UI) | 886 #elif defined(TOUCH_UI) |
| 881 base::MessagePumpDispatcher::DispatchStatus | 887 base::MessagePumpDispatcher::DispatchStatus |
| 882 MenuController::Dispatch(XEvent* xev) { | 888 MenuController::Dispatch(XEvent* xev) { |
| 883 if (!DispatchXEvent(xev)) | 889 if (!DispatchXEvent(xev)) |
| 884 return EVENT_IGNORED; | 890 return EVENT_IGNORED; |
| 885 | 891 |
| 886 return exit_type_ != EXIT_NONE ? | 892 return exit_type_ != EXIT_NONE ? |
| 887 base::MessagePumpDispatcher::EVENT_QUIT : | 893 base::MessagePumpDispatcher::EVENT_QUIT : |
| 888 base::MessagePumpDispatcher::EVENT_PROCESSED; | 894 base::MessagePumpDispatcher::EVENT_PROCESSED; |
| 889 } | 895 } |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 return; | 1936 return; |
| 1931 | 1937 |
| 1932 // Reset the active_mouse_view_ before sending mouse capture lost. That way if | 1938 // Reset the active_mouse_view_ before sending mouse capture lost. That way if |
| 1933 // it calls back to us, we aren't in a weird state. | 1939 // it calls back to us, we aren't in a weird state. |
| 1934 View* active_view = active_mouse_view_; | 1940 View* active_view = active_mouse_view_; |
| 1935 active_mouse_view_ = NULL; | 1941 active_mouse_view_ = NULL; |
| 1936 active_view->OnMouseCaptureLost(); | 1942 active_view->OnMouseCaptureLost(); |
| 1937 } | 1943 } |
| 1938 | 1944 |
| 1939 } // namespace views | 1945 } // namespace views |
| OLD | NEW |