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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 | 873 |
874 default: | 874 default: |
875 break; | 875 break; |
876 } | 876 } |
877 TranslateMessage(&msg); | 877 TranslateMessage(&msg); |
878 DispatchMessage(&msg); | 878 DispatchMessage(&msg); |
879 return exit_type_ == EXIT_NONE; | 879 return exit_type_ == EXIT_NONE; |
880 } | 880 } |
881 #elif defined(USE_WAYLAND) | 881 #elif defined(USE_WAYLAND) |
882 base::MessagePumpDispatcher::DispatchStatus | 882 base::MessagePumpDispatcher::DispatchStatus |
883 MenuController::Dispatch(ui::WaylandEvent* ev) { | 883 MenuController::Dispatch(base::wayland::WaylandEvent* ev) { |
884 return exit_type_ != EXIT_NONE ? | 884 return exit_type_ != EXIT_NONE ? |
885 base::MessagePumpDispatcher::EVENT_QUIT : | 885 base::MessagePumpDispatcher::EVENT_QUIT : |
886 base::MessagePumpDispatcher::EVENT_PROCESSED; | 886 base::MessagePumpDispatcher::EVENT_PROCESSED; |
887 } | 887 } |
888 | 888 |
889 #elif defined(USE_AURA) | 889 #elif defined(USE_AURA) |
890 base::MessagePumpDispatcher::DispatchStatus | 890 base::MessagePumpDispatcher::DispatchStatus |
891 MenuController::Dispatch(XEvent* xev) { | 891 MenuController::Dispatch(XEvent* xev) { |
892 if (exit_type_ == EXIT_ALL || exit_type_ == EXIT_DESTROYED) { | 892 if (exit_type_ == EXIT_ALL || exit_type_ == EXIT_DESTROYED) { |
893 aura::Desktop::GetInstance()->GetDispatcher()->Dispatch(xev); | 893 aura::Desktop::GetInstance()->GetDispatcher()->Dispatch(xev); |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 return; | 1955 return; |
1956 | 1956 |
1957 // Reset the active_mouse_view_ before sending mouse capture lost. That way if | 1957 // Reset the active_mouse_view_ before sending mouse capture lost. That way if |
1958 // it calls back to us, we aren't in a weird state. | 1958 // it calls back to us, we aren't in a weird state. |
1959 View* active_view = active_mouse_view_; | 1959 View* active_view = active_mouse_view_; |
1960 active_mouse_view_ = NULL; | 1960 active_mouse_view_ = NULL; |
1961 active_view->OnMouseCaptureLost(); | 1961 active_view->OnMouseCaptureLost(); |
1962 } | 1962 } |
1963 | 1963 |
1964 } // namespace views | 1964 } // namespace views |
OLD | NEW |