#ifndef MainFrame_h
#define MainFrame_h
#include "Frame.h"
#include <wtf/Vector.h>
namespace WebCore {
class DiagnosticLoggingClient;
class PageConfiguration;
class PageOverlayController;
class ScrollLatchingState;
class ServicesOverlayController;
class WheelEventDeltaTracker;
class MainFrame final : public Frame {
public:
static Ref<MainFrame> create(Page&, PageConfiguration&);
virtual ~MainFrame();
void selfOnlyRef();
void selfOnlyDeref();
WheelEventDeltaTracker* wheelEventDeltaTracker() { return m_recentWheelEventDeltaTracker.get(); }
PageOverlayController& pageOverlayController() { return *m_pageOverlayController; }
#if PLATFORM(MAC)
#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
ServicesOverlayController& servicesOverlayController() { return *m_servicesOverlayController; }
#endif // ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
ScrollLatchingState* latchingState();
void pushNewLatchingState();
void popLatchingState();
void resetLatchingState();
#endif // PLATFORM(MAC)
WEBCORE_EXPORT DiagnosticLoggingClient& diagnosticLoggingClient() const;
private:
MainFrame(Page&, PageConfiguration&);
void dropChildren();
unsigned m_selfOnlyRefCount;
#if PLATFORM(MAC)
Vector<ScrollLatchingState> m_latchingState;
#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
std::unique_ptr<ServicesOverlayController> m_servicesOverlayController;
#endif
#endif
std::unique_ptr<WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
std::unique_ptr<PageOverlayController> m_pageOverlayController;
DiagnosticLoggingClient* m_diagnosticLoggingClient;
};
inline bool Frame::isMainFrame() const
{
return this == &m_mainFrame;
}
}
#endif