| 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 Cancel(EXIT_ALL); | 860 Cancel(EXIT_ALL); |
| 861 return false; | 861 return false; |
| 862 | 862 |
| 863 default: | 863 default: |
| 864 break; | 864 break; |
| 865 } | 865 } |
| 866 TranslateMessage(&msg); | 866 TranslateMessage(&msg); |
| 867 DispatchMessage(&msg); | 867 DispatchMessage(&msg); |
| 868 return exit_type_ == EXIT_NONE; | 868 return exit_type_ == EXIT_NONE; |
| 869 } | 869 } |
| 870 #elif defined(USE_WAYLAND) |
| 871 base::MessagePumpDispatcher::DispatchStatus |
| 872 MenuController::Dispatch(ui::WaylandEvent* ev) { |
| 873 return exit_type_ != EXIT_NONE ? |
| 874 base::MessagePumpDispatcher::EVENT_QUIT : |
| 875 base::MessagePumpDispatcher::EVENT_PROCESSED; |
| 876 } |
| 870 #elif defined(TOUCH_UI) | 877 #elif defined(TOUCH_UI) |
| 871 base::MessagePumpDispatcher::DispatchStatus | 878 base::MessagePumpDispatcher::DispatchStatus |
| 872 MenuController::Dispatch(XEvent* xev) { | 879 MenuController::Dispatch(XEvent* xev) { |
| 873 if (!DispatchXEvent(xev)) | 880 if (!DispatchXEvent(xev)) |
| 874 return EVENT_IGNORED; | 881 return EVENT_IGNORED; |
| 875 | 882 |
| 876 return exit_type_ != EXIT_NONE ? | 883 return exit_type_ != EXIT_NONE ? |
| 877 base::MessagePumpDispatcher::EVENT_QUIT : | 884 base::MessagePumpDispatcher::EVENT_QUIT : |
| 878 base::MessagePumpDispatcher::EVENT_PROCESSED; | 885 base::MessagePumpDispatcher::EVENT_PROCESSED; |
| 879 } | 886 } |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1906 return; | 1913 return; |
| 1907 | 1914 |
| 1908 // Reset the active_mouse_view_ before sending mouse capture lost. That way if | 1915 // Reset the active_mouse_view_ before sending mouse capture lost. That way if |
| 1909 // it calls back to us, we aren't in a weird state. | 1916 // it calls back to us, we aren't in a weird state. |
| 1910 View* active_view = active_mouse_view_; | 1917 View* active_view = active_mouse_view_; |
| 1911 active_mouse_view_ = NULL; | 1918 active_mouse_view_ = NULL; |
| 1912 active_view->OnMouseCaptureLost(); | 1919 active_view->OnMouseCaptureLost(); |
| 1913 } | 1920 } |
| 1914 | 1921 |
| 1915 } // namespace views | 1922 } // namespace views |
| OLD | NEW |