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

Unified Diff: chrome/browser/chromeos/system_key_event_listener.h

Issue 7011005: Use observer for an X message pump to intercept keyevents for volume control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/system_key_event_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system_key_event_listener.h
diff --git a/chrome/browser/chromeos/system_key_event_listener.h b/chrome/browser/chromeos/system_key_event_listener.h
index 2a6ebf6c97192b6ca411ec9d2a2426453cc7eb1d..7ba32d5530404ae0da68d243df5b5b970cf510b2 100644
--- a/chrome/browser/chromeos/system_key_event_listener.h
+++ b/chrome/browser/chromeos/system_key_event_listener.h
@@ -9,8 +9,11 @@
#include <gdk/gdk.h>
#include "base/memory/singleton.h"
+#include "base/message_loop.h"
#include "chrome/browser/chromeos/wm_message_listener.h"
+typedef union _XEvent XEvent;
+
namespace chromeos {
class AudioHandler;
@@ -22,7 +25,8 @@ class AudioHandler;
// TODO(davej): Remove WmMessageListener::Observer once volume key handling has
// been removed from the window manager since those keys take precedence.
-class SystemKeyEventListener : public WmMessageListener::Observer {
+class SystemKeyEventListener : public WmMessageListener::Observer,
+ public MessageLoopForUI::Observer {
public:
static SystemKeyEventListener* GetInstance();
@@ -55,6 +59,15 @@ class SystemKeyEventListener : public WmMessageListener::Observer {
void OnVolumeDown();
void OnVolumeUp();
+ // MessageLoopForUI::Observer overrides.
+ virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {}
+ virtual void DidProcessEvent(GdkEvent* event) OVERRIDE {}
+ virtual bool WillProcessXEvent(XEvent* xevent)
+#if defined(TOUCH_UI)
+ OVERRIDE
+#endif
+ ;
+
int32 key_volume_mute_;
int32 key_volume_down_;
int32 key_volume_up_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/system_key_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698