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

Unified Diff: chrome/browser/chromeos/system_key_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/system_key_event_listener.cc
diff --git a/chrome/browser/chromeos/system_key_event_listener.cc b/chrome/browser/chromeos/system_key_event_listener.cc
index 00991b819494c2590276f0539953536063883d2d..af70d12feec2d1b68f689214d1c5750b825d70ad 100644
--- a/chrome/browser/chromeos/system_key_event_listener.cc
+++ b/chrome/browser/chromeos/system_key_event_listener.cc
@@ -14,7 +14,7 @@
#include "third_party/cros/chromeos_wm_ipc_enums.h"
#if defined(TOUCH_UI)
-#include "base/message_pump_glib_x_dispatch.h"
+#include "base/message_pump_x.h"
#endif
namespace chromeos {
@@ -99,6 +99,12 @@ void SystemKeyEventListener::ProcessWmMessage(const WmIpc::Message& message,
}
}
+#if defined(TOUCH_UI)
+base::MessagePumpObserver::EventStatus
+ SystemKeyEventListener::WillProcessXEvent(XEvent* xevent) {
+ return ProcessedXEvent(xevent) ? EVENT_HANDLED : EVENT_CONTINUE;
+}
+#else // defined(TOUCH_UI)
// static
GdkFilterReturn SystemKeyEventListener::GdkEventFilter(GdkXEvent* gxevent,
GdkEvent* gevent,
@@ -106,9 +112,10 @@ GdkFilterReturn SystemKeyEventListener::GdkEventFilter(GdkXEvent* gxevent,
SystemKeyEventListener* listener = static_cast<SystemKeyEventListener*>(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)
void SystemKeyEventListener::GrabKey(int32 key, uint32 mask) {
uint32 num_lock_mask = Mod2Mask;
@@ -160,7 +167,7 @@ void SystemKeyEventListener::OnVolumeUp() {
BrightnessBubble::GetInstance()->HideBubble();
}
-bool SystemKeyEventListener::WillProcessXEvent(XEvent* xevent) {
+bool SystemKeyEventListener::ProcessedXEvent(XEvent* xevent) {
if (xevent->type == KeyPress) {
int32 keycode = xevent->xkey.keycode;
if (keycode) {
« no previous file with comments | « chrome/browser/chromeos/system_key_event_listener.h ('k') | chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698