ReplayInputDispatchMethods.cpp [plain text]
#include "config.h"
#if ENABLE(WEB_REPLAY)
#include "AllReplayInputs.h"
#include "MainFrame.h"
#include "NavigationScheduler.h"
#include "Page.h"
#include "ReplayController.h"
#include "URL.h"
#include "UserInputBridge.h"
namespace WebCore {
void BeginSegmentSentinel::dispatch(ReplayController&)
{
}
void EndSegmentSentinel::dispatch(ReplayController&)
{
}
void InitialNavigation::dispatch(ReplayController& controller)
{
Frame& frame = controller.page().mainFrame();
frame.navigationScheduler().scheduleLocationChange(frame.document(), m_securityOrigin.get(), m_url, m_referrer);
}
void HandleKeyPress::dispatch(ReplayController& controller)
{
controller.page().userInputBridge().handleKeyEvent(platformEvent(), InputSource::Synthetic);
}
void HandleMouseMove::dispatch(ReplayController& controller)
{
if (m_scrollbarTargeted)
controller.page().userInputBridge().handleMouseMoveOnScrollbarEvent(platformEvent(), InputSource::Synthetic);
else
controller.page().userInputBridge().handleMouseMoveEvent(platformEvent(), InputSource::Synthetic);
}
void HandleMousePress::dispatch(ReplayController& controller)
{
controller.page().userInputBridge().handleMousePressEvent(platformEvent(), InputSource::Synthetic);
}
void HandleMouseRelease::dispatch(ReplayController& controller)
{
controller.page().userInputBridge().handleMouseReleaseEvent(platformEvent(), InputSource::Synthetic);
}
void HandleWheelEvent::dispatch(ReplayController& controller)
{
controller.page().userInputBridge().handleWheelEvent(platformEvent(), InputSource::Synthetic);
}
void LogicalScrollPage::dispatch(ReplayController& controller)
{
controller.page().userInputBridge().logicalScrollRecursively(direction(), granularity(), InputSource::Synthetic);
}
void ScrollPage::dispatch(ReplayController& controller)
{
controller.page().userInputBridge().scrollRecursively(direction(), granularity(), InputSource::Synthetic);
}
}
#endif // ENABLE(WEB_REPLAY)