#ifndef CHROME_BROWSER_CHROMEOS_EVENTS_SYSTEM_KEY_EVENT_LISTENER_H_
#define CHROME_BROWSER_CHROMEOS_EVENTS_SYSTEM_KEY_EVENT_LISTENER_H_
#include "base/memory/singleton.h"
#include "base/message_loop/message_loop.h"
typedef union _XEvent XEvent;
namespace chromeos {
class SystemKeyEventListener : public base::MessageLoopForUI::Observer {
public:
static void Initialize();
static void Shutdown();
static SystemKeyEventListener* GetInstance();
void Stop();
private:
friend struct DefaultSingletonTraits<SystemKeyEventListener>;
friend class SystemKeyEventListenerTest;
SystemKeyEventListener();
virtual ~SystemKeyEventListener();
virtual base::EventStatus WillProcessEvent(
const base::NativeEvent& event) OVERRIDE;
virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
virtual bool ProcessedXEvent(XEvent* xevent);
bool stopped_;
int xkb_event_base_;
DISALLOW_COPY_AND_ASSIGN(SystemKeyEventListener);
};
}
#endif