#ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_
#define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_
#include "base/message_loop/message_pump_dispatcher.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "ui/display/chromeos/x11/native_display_delegate_x11.h"
namespace ui {
class DISPLAY_EXPORT NativeDisplayEventDispatcherX11
: public base::MessagePumpDispatcher {
public:
NativeDisplayEventDispatcherX11(
NativeDisplayDelegateX11::HelperDelegate* delegate,
int xrandr_event_base);
virtual ~NativeDisplayEventDispatcherX11();
virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE;
void SetTickClockForTest(scoped_ptr<base::TickClock> tick_clock);
static const int kCachedOutputsExpirationMs;
private:
NativeDisplayDelegateX11::HelperDelegate* delegate_;
int xrandr_event_base_;
base::TimeTicks last_notified_time_;
scoped_ptr<base::TickClock> tick_clock_;
DISALLOW_COPY_AND_ASSIGN(NativeDisplayEventDispatcherX11);
};
}
#endif