#ifndef CHROMECAST_BROWSER_CAST_CONTENT_GESTURE_HANDLER_H_
#define CHROMECAST_BROWSER_CAST_CONTENT_GESTURE_HANDLER_H_
#include "base/timer/elapsed_timer.h"
#include "chromecast/browser/gesture_router.h"
#include "chromecast/graphics/gestures/cast_gesture_handler.h"
namespace chromecast {
class CastContentGestureHandler : public CastGestureHandler {
public:
explicit CastContentGestureHandler(GestureRouter* delegate);
CastContentGestureHandler(GestureRouter* delegate,
bool enable_top_drag_gesture);
~CastContentGestureHandler() override;
Priority GetPriority() override;
bool CanHandleSwipe(CastSideSwipeOrigin swipe_origin) override;
void HandleSideSwipe(CastSideSwipeEvent event,
CastSideSwipeOrigin swipe_origin,
const gfx::Point& touch_location) override;
void HandleTapDownGesture(const gfx::Point& touch_location) override;
void HandleTapGesture(const gfx::Point& touch_location) override;
void SetPriority(Priority priority);
private:
GestureType GestureForSwipeOrigin(CastSideSwipeOrigin swipe_origin);
Priority priority_;
const bool enable_top_drag_gesture_;
const int back_horizontal_threshold_;
GestureRouter* const delegate_;
base::ElapsedTimer current_swipe_time_;
};
}
#endif