#ifndef UI_OZONE_PLATFORM_CACA_CACA_EVENT_FACTORY_H_
#define UI_OZONE_PLATFORM_CACA_CACA_EVENT_FACTORY_H_
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "ui/events/ozone/event_factory_ozone.h"
#include "ui/gfx/geometry/point_f.h"
namespace ui {
class CacaConnection;
class CacaEventFactory : public ui::EventFactoryOzone {
public:
CacaEventFactory(CacaConnection* connection);
virtual ~CacaEventFactory();
virtual void StartProcessingEvents() OVERRIDE;
virtual void WarpCursorTo(gfx::AcceleratedWidget widget,
const gfx::PointF& location) OVERRIDE;
private:
void ScheduleEventProcessing();
void TryProcessingEvent();
CacaConnection* connection_;
base::WeakPtrFactory<CacaEventFactory> weak_ptr_factory_;
base::TimeDelta delay_;
gfx::PointF last_cursor_location_;
int modifier_flags_;
DISALLOW_COPY_AND_ASSIGN(CacaEventFactory);
};
}
#endif