Delete WebMetal implementation in favor of WebGPU
[WebKit-https.git] / Source / WebCore / platform / PasteboardWriterData.h
index 9bc7675..ed2eeef 100644 (file)
 
 #pragma once
 
-#include "URL.h"
 #include <wtf/Optional.h>
+#include <wtf/URL.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
+class SharedBuffer;
+
 class PasteboardWriterData final {
 public:
-    PasteboardWriterData();
-    ~PasteboardWriterData();
+    WEBCORE_EXPORT PasteboardWriterData();
+    WEBCORE_EXPORT ~PasteboardWriterData();
 
     WEBCORE_EXPORT bool isEmpty() const;
 
@@ -43,11 +45,29 @@ public:
         String text;
     };
 
-    const std::optional<PlainText>& plainText() const { return m_plainText; }
+    struct WebContent {
+        WebContent();
+        WEBCORE_EXPORT ~WebContent();
+
+#if PLATFORM(COCOA)
+        String contentOrigin;
+        bool canSmartCopyOrDelete;
+        RefPtr<SharedBuffer> dataInWebArchiveFormat;
+        RefPtr<SharedBuffer> dataInRTFDFormat;
+        RefPtr<SharedBuffer> dataInRTFFormat;
+        RefPtr<SharedBuffer> dataInAttributedStringFormat;
+        String dataInHTMLFormat;
+        String dataInStringFormat;
+        Vector<String> clientTypes;
+        Vector<RefPtr<SharedBuffer>> clientData;
+#endif
+    };
+
+    const Optional<PlainText>& plainText() const { return m_plainText; }
     void setPlainText(PlainText);
 
-    struct URL {
-        WebCore::URL url;
+    struct URLData {
+        URL url;
         String title;
 #if PLATFORM(MAC)
         String userVisibleForm;
@@ -56,12 +76,16 @@ public:
 #endif
     };
 
-    const std::optional<URL>& url() const { return m_url; }
-    void setURL(URL);
+    const Optional<URLData>& urlData() const { return m_url; }
+    void setURLData(URLData);
+
+    const Optional<WebContent>& webContent() const { return m_webContent; }
+    void setWebContent(WebContent);
 
 private:
-    std::optional<PlainText> m_plainText;
-    std::optional<URL> m_url;
+    Optional<PlainText> m_plainText;
+    Optional<URLData> m_url;
+    Optional<WebContent> m_webContent;
 };
 
 }