Move URL from WebCore to WTF
[WebKit-https.git] / Source / WebCore / loader / PingLoader.h
index 6ab5ca3..6deef45 100644 (file)
 
 #include <wtf/Forward.h>
 #include <wtf/Ref.h>
-#include <wtf/Variant.h>
-
-namespace JSC {
-
-class ArrayBuffer;
-class ArrayBufferView;
-
-}
 
 namespace WebCore {
 
-class Blob;
-class DOMFormData;
-class Document;
 class FormData;
 class Frame;
-class URL;
-class URLSearchParams;
+class HTTPHeaderMap;
 class ResourceRequest;
 
 enum class ViolationReportType {
@@ -59,18 +47,15 @@ enum class ViolationReportType {
     XSSAuditor,
 };
 
-using BodyInit = Variant<RefPtr<Blob>, RefPtr<JSC::ArrayBufferView>, RefPtr<JSC::ArrayBuffer>, RefPtr<DOMFormData>, RefPtr<URLSearchParams>, String>;
-
 class PingLoader {
 public:
     static void loadImage(Frame&, const URL&);
-    static bool sendBeacon(Frame&, Document&, const URL&, std::optional<BodyInit>&&);
     static void sendPing(Frame&, const URL& pingURL, const URL& destinationURL);
-    static void sendViolationReport(Frame&, const URL& reportURL, Ref<FormData>&& report, ViolationReportType);
+    WEBCORE_EXPORT static void sendViolationReport(Frame&, const URL& reportURL, Ref<FormData>&& report, ViolationReportType);
 
 private:
     enum class ShouldFollowRedirects { No, Yes };
-    static void startPingLoad(Frame&, ResourceRequest&, ShouldFollowRedirects);
+    static void startPingLoad(Frame&, ResourceRequest&, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects);
 };
 
 } // namespace WebCore