Add CSS -webkit-appearance property for Apple Pay buttons
[WebKit-https.git] / Source / WebCore / platform / ContextMenu.h
index f0a80d7..94f6b6a 100644 (file)
 #include <wtf/Noncopyable.h>
 
 #include "ContextMenuItem.h"
-#include "PlatformMenuDescription.h"
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(COCOA)
-#include <wtf/RetainPtr.h>
-#elif PLATFORM(WIN)
-#include <windows.h>
-#endif
-
 namespace WebCore {
 
-    class ContextMenuController;
-
-    class ContextMenu {
-        WTF_MAKE_NONCOPYABLE(ContextMenu); WTF_MAKE_FAST_ALLOCATED;
-    public:
-        ContextMenu();
-
-        ContextMenuItem* itemWithAction(unsigned);
-
-#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
-        explicit ContextMenu(PlatformContextMenu);
-
-        PlatformContextMenu platformContextMenu() const;
-
-        static PlatformContextMenu createPlatformContextMenuFromItems(const Vector<ContextMenuItem>&);
-        static void getContextMenuItems(PlatformContextMenu, Vector<ContextMenuItem>&);
-
-        // FIXME: When more platforms switch over, this should return const ContextMenuItem*'s.
-        ContextMenuItem* itemAtIndex(unsigned index) { return &m_items[index]; }
-
-        void setItems(const Vector<ContextMenuItem>& items) { m_items = items; }
-        const Vector<ContextMenuItem>& items() const { return m_items; }
-
-        void appendItem(const ContextMenuItem& item) { m_items.append(item); } 
-#else
-        explicit ContextMenu(const PlatformMenuDescription);
-        ~ContextMenu();
-
-        void insertItem(unsigned position, ContextMenuItem&);
-        void appendItem(ContextMenuItem&);
-
-        ContextMenuItem* itemAtIndex(unsigned, const PlatformMenuDescription);
-
-        unsigned itemCount() const;
-
-        PlatformMenuDescription platformDescription() const;
-        void setPlatformDescription(PlatformMenuDescription);
+class ContextMenuController;
 
-        PlatformMenuDescription releasePlatformDescription();
-#endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
+class ContextMenu {
+    WTF_MAKE_NONCOPYABLE(ContextMenu); WTF_MAKE_FAST_ALLOCATED;
+public:
+    ContextMenu();
 
-    private:
-#if USE(CROSS_PLATFORM_CONTEXT_MENUS)
-        Vector<ContextMenuItem> m_items;
-#else
-#if PLATFORM(COCOA)
-        // Keep this in sync with the PlatformMenuDescription typedef
-        RetainPtr<NSMutableArray> m_platformDescription;
-#else
-        PlatformMenuDescription m_platformDescription;
-#if OS(WINCE)
-        unsigned m_itemCount;
-#endif
-#endif
+    void setItems(const Vector<ContextMenuItem>& items) { m_items = items; }
+    const Vector<ContextMenuItem>& items() const { return m_items; }
 
-#endif // USE(CROSS_PLATFORM_CONTEXT_MENUS)
-    };
+    void appendItem(const ContextMenuItem& item) { m_items.append(item); } 
 
-#if !USE(CROSS_PLATFORM_CONTEXT_MENUS)
-Vector<ContextMenuItem> contextMenuItemVector(PlatformMenuDescription);
-PlatformMenuDescription platformMenuDescription(Vector<ContextMenuItem>&);
-#endif
+private:
+    Vector<ContextMenuItem> m_items;
+};
 
 }