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

Unified Diff: chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc

Issue 7250001: Refactor the glib message-pump, and use it as the base for a gtk message pump and an X message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: media.gyp update Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc
diff --git a/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc b/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc
index d5968b426f2b2b47951d8c3d16d260014afa0009..22b89fe485e3d551ffe96b01b486edfe4f17dade 100644
--- a/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc
+++ b/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc
@@ -96,6 +96,12 @@ void XInputHierarchyChangedEventListener::Stop() {
xiopcode_ = -1;
}
+#if defined(TOUCH_UI)
+base::MessagePumpObserver::EventStatus
+ XInputHierarchyChangedEventListener::WillProcessXEvent(XEvent* xevent) {
+ return ProcessedXEvent(xevent) ? EVENT_HANDLED : EVENT_CONTINUE;
+}
+#else // defined(TOUCH_UI)
// static
GdkFilterReturn XInputHierarchyChangedEventListener::GdkEventFilter(
GdkXEvent* gxevent, GdkEvent* gevent, gpointer data) {
@@ -103,11 +109,12 @@ GdkFilterReturn XInputHierarchyChangedEventListener::GdkEventFilter(
static_cast<XInputHierarchyChangedEventListener*>(data);
XEvent* xevent = static_cast<XEvent*>(gxevent);
- return listener->WillProcessXEvent(xevent) ? GDK_FILTER_REMOVE
- : GDK_FILTER_CONTINUE;
+ return listener->ProcessedXEvent(xevent) ? GDK_FILTER_REMOVE
+ : GDK_FILTER_CONTINUE;
}
+#endif // defined(TOUCH_UI)
-bool XInputHierarchyChangedEventListener::WillProcessXEvent(XEvent* xevent) {
+bool XInputHierarchyChangedEventListener::ProcessedXEvent(XEvent* xevent) {
if ((xevent->xcookie.type != GenericEvent) ||
(xevent->xcookie.extension != xiopcode_)) {
return false;

Powered by Google App Engine
This is Rietveld 408576698