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

Unified Diff: chrome/browser/chromeos/views/native_menu_domui.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/views/native_menu_domui.h ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/views/native_menu_domui.cc
diff --git a/chrome/browser/chromeos/views/native_menu_domui.cc b/chrome/browser/chromeos/views/native_menu_domui.cc
index 01e4b342b2fa4a4e20b8ef3ecba2b4902d6c6304..5ffb24f31a2a735841e3d4a8fc001a89873affe8 100644
--- a/chrome/browser/chromeos/views/native_menu_domui.cc
+++ b/chrome/browser/chromeos/views/native_menu_domui.cc
@@ -19,11 +19,13 @@
#include "chrome/common/url_constants.h"
#include "gfx/rect.h"
#include "views/controls/menu/menu_2.h"
-#include "views/controls/menu/native_menu_gtk.h"
#include "views/controls/menu/nested_dispatcher_gtk.h"
#if defined(TOUCH_UI)
#include "views/focus/accelerator_handler.h"
+#include "views/controls/menu/native_menu_x.h"
+#else
+#include "views/controls/menu/native_menu_gtk.h"
#endif
namespace {
@@ -249,8 +251,12 @@ bool NativeMenuDOMUI::Dispatch(GdkEvent* event) {
}
#if defined(TOUCH_UI)
-bool NativeMenuDOMUI::Dispatch(XEvent* xevent) {
- return views::DispatchXEvent(xevent);
+base::MessagePumpGlibXDispatcher::DispatchStatus NativeMenuDOMUI::Dispatch(
+ XEvent* xevent) {
+ return views::DispatchXEvent(xevent) ?
+ base::MessagePumpGlibXDispatcher::EVENT_PROCESSED :
+ base::MessagePumpGlibXDispatcher::EVENT_IGNORED;
+
}
#endif
@@ -406,7 +412,11 @@ MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) {
if (chromeos::MenuUI::IsEnabled()) {
return new chromeos::NativeMenuDOMUI(model, true);
} else {
+#if defined(TOUCH_UI)
+ return new NativeMenuX(menu);
+#else
return new NativeMenuGtk(menu);
+#endif
}
}
« no previous file with comments | « chrome/browser/chromeos/views/native_menu_domui.h ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698