Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: views/controls/menu/menu_controller.cc

Issue 7464027: Wayland support for views. views_desktop on Wayland. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated native_widget_wayland.cc to match compositor changes Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/menu/menu_controller.h ('k') | views/controls/menu/menu_image_util_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « views/controls/menu/menu_controller.h ('k') | views/controls/menu/menu_image_util_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698