| 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 Cancel(EXIT_ALL); | 862 Cancel(EXIT_ALL); |
| 863 return false; | 863 return false; |
| 864 | 864 |
| 865 default: | 865 default: |
| 866 break; | 866 break; |
| 867 } | 867 } |
| 868 TranslateMessage(&msg); | 868 TranslateMessage(&msg); |
| 869 DispatchMessage(&msg); | 869 DispatchMessage(&msg); |
| 870 return exit_type_ == EXIT_NONE; | 870 return exit_type_ == EXIT_NONE; |
| 871 } | 871 } |
| 872 #elif defined(USE_WAYLAND) |
| 873 base::MessagePumpDispatcher::DispatchStatus |
| 874 MenuController::Dispatch(ui::WaylandEvent* ev) { |
| 875 return exit_type_ != EXIT_NONE ? |
| 876 base::MessagePumpDispatcher::EVENT_QUIT : |
| 877 base::MessagePumpDispatcher::EVENT_PROCESSED; |
| 878 } |
| 872 #elif defined(TOUCH_UI) | 879 #elif defined(TOUCH_UI) |
| 873 base::MessagePumpDispatcher::DispatchStatus | 880 base::MessagePumpDispatcher::DispatchStatus |
| 874 MenuController::Dispatch(XEvent* xev) { | 881 MenuController::Dispatch(XEvent* xev) { |
| 875 if (!DispatchXEvent(xev)) | 882 if (!DispatchXEvent(xev)) |
| 876 return EVENT_IGNORED; | 883 return EVENT_IGNORED; |
| 877 | 884 |
| 878 return exit_type_ != EXIT_NONE ? | 885 return exit_type_ != EXIT_NONE ? |
| 879 base::MessagePumpDispatcher::EVENT_QUIT : | 886 base::MessagePumpDispatcher::EVENT_QUIT : |
| 880 base::MessagePumpDispatcher::EVENT_PROCESSED; | 887 base::MessagePumpDispatcher::EVENT_PROCESSED; |
| 881 } | 888 } |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 return; | 1928 return; |
| 1922 | 1929 |
| 1923 // Reset the active_mouse_view_ before sending mouse capture lost. That way if | 1930 // Reset the active_mouse_view_ before sending mouse capture lost. That way if |
| 1924 // it calls back to us, we aren't in a weird state. | 1931 // it calls back to us, we aren't in a weird state. |
| 1925 View* active_view = active_mouse_view_; | 1932 View* active_view = active_mouse_view_; |
| 1926 active_mouse_view_ = NULL; | 1933 active_mouse_view_ = NULL; |
| 1927 active_view->OnMouseCaptureLost(); | 1934 active_view->OnMouseCaptureLost(); |
| 1928 } | 1935 } |
| 1929 | 1936 |
| 1930 } // namespace views | 1937 } // namespace views |
| OLD | NEW |