Fix build for future versions of Clang.
[WebKit-https.git] / Source / WebCore / page / MainFrame.h
index 8a1476b..c221167 100644 (file)
 #ifndef MainFrame_h
 #define MainFrame_h
 
+#include "EventHandler.h"
 #include "Frame.h"
+#include <wtf/Vector.h>
 
 namespace WebCore {
 
+class PageConfiguration;
+class PageOverlayController;
+class PaymentCoordinator;
 class ScrollLatchingState;
-class WheelEventDeltaTracker;
+class ServicesOverlayController;
+class WheelEventDeltaFilter;
 
 class MainFrame final : public Frame {
 public:
-    static RefPtr<MainFrame> create(Page&, FrameLoaderClient&);
+    static Ref<MainFrame> create(Page&, PageConfiguration&);
 
     virtual ~MainFrame();
 
     void selfOnlyRef();
     void selfOnlyDeref();
 
-    WheelEventDeltaTracker* wheelEventDeltaTracker() { return m_recentWheelEventDeltaTracker.get(); }
+    WheelEventDeltaFilter* wheelEventDeltaFilter() { return m_recentWheelEventDeltaFilter.get(); }
+    PageOverlayController& pageOverlayController() { return *m_pageOverlayController; }
 
 #if PLATFORM(MAC)
-    ScrollLatchingState* latchingState() { return m_latchingState.get(); }
+#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();
+    void removeLatchingStateForTarget(Element&);
+#endif // PLATFORM(MAC)
+
+#if ENABLE(APPLE_PAY)
+    PaymentCoordinator& paymentCoordinator() const { return *m_paymentCoordinator; }
 #endif
 
 private:
-    MainFrame(Page&, FrameLoaderClient&);
+    MainFrame(Page&, PageConfiguration&);
 
     void dropChildren();
 
     unsigned m_selfOnlyRefCount;
 
 #if PLATFORM(MAC)
-    std::unique_ptr<ScrollLatchingState> m_latchingState;
+    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;
-};
 
-inline bool Frame::isMainFrame() const
-{
-    return this == &m_mainFrame;
-}
+    std::unique_ptr<WheelEventDeltaFilter> m_recentWheelEventDeltaFilter;
+    std::unique_ptr<PageOverlayController> m_pageOverlayController;
+
+#if ENABLE(APPLE_PAY)
+    std::unique_ptr<PaymentCoordinator> m_paymentCoordinator;
+#endif
+};
 
 }