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

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

Issue 5110011: A non-GTK version of menus for touchui. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix compile for touch on chromeos Created 10 years 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_item_view.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/keyboard_codes.h" 7 #include "app/keyboard_codes.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/os_exchange_data.h" 9 #include "app/os_exchange_data.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 } 853 }
854 854
855 // We don't want Gtk to handle keyboard events, otherwise if they get 855 // We don't want Gtk to handle keyboard events, otherwise if they get
856 // handled by Gtk, unexpected behavior may occur. For example Tab key 856 // handled by Gtk, unexpected behavior may occur. For example Tab key
857 // may cause unexpected focus traversing. 857 // may cause unexpected focus traversing.
858 gtk_main_do_event(event); 858 gtk_main_do_event(event);
859 return exit_type_ == EXIT_NONE; 859 return exit_type_ == EXIT_NONE;
860 } 860 }
861 861
862 #if defined(TOUCH_UI) 862 #if defined(TOUCH_UI)
863 bool MenuController::Dispatch(XEvent* xev) { 863 base::MessagePumpGlibXDispatcher::DispatchStatus MenuController::Dispatch(
864 return DispatchXEvent(xev); 864 XEvent* xev) {
865 if (!DispatchXEvent(xev))
866 return EVENT_IGNORED;
867
868 return exit_type_ != EXIT_NONE ?
869 base::MessagePumpGlibXDispatcher::EVENT_QUIT :
870 base::MessagePumpGlibXDispatcher::EVENT_PROCESSED;
865 } 871 }
866 #endif 872 #endif
867 873
868 #endif 874 #endif
869 875
870 bool MenuController::OnKeyDown(int key_code 876 bool MenuController::OnKeyDown(int key_code
871 #if defined(OS_WIN) 877 #if defined(OS_WIN)
872 , const MSG& msg 878 , const MSG& msg
873 #else 879 #else
874 #endif 880 #endif
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 1816
1811 MouseEvent release_event(Event::ET_MOUSE_RELEASED, -1, -1, 0); 1817 MouseEvent release_event(Event::ET_MOUSE_RELEASED, -1, -1, 0);
1812 // Reset the active_mouse_view_ before sending mouse released. That way if if 1818 // Reset the active_mouse_view_ before sending mouse released. That way if if
1813 // calls back to use we aren't in a weird state. 1819 // calls back to use we aren't in a weird state.
1814 View* active_view = active_mouse_view_; 1820 View* active_view = active_mouse_view_;
1815 active_mouse_view_ = NULL; 1821 active_mouse_view_ = NULL;
1816 active_view->OnMouseReleased(release_event, true); 1822 active_view->OnMouseReleased(release_event, true);
1817 } 1823 }
1818 1824
1819 } // namespace views 1825 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_controller.h ('k') | views/controls/menu/menu_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698