#ifndef Pasteboard_h
#define Pasteboard_h
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
#endif
#if PLATFORM(GTK)
#include <PasteboardHelper.h>
#endif
#if PLATFORM(MAC)
#ifdef __OBJC__
@class NSFileWrapper;
@class NSPasteboard;
@class NSArray;
@class NSDictionary;
#else
class NSFileWrapper;
class NSPasteboard;
class NSArray;
class NSDictionary;
#endif
#endif
#if PLATFORM(WIN)
#include <windows.h>
typedef struct HWND__* HWND;
#endif
#if PLATFORM(CHROMIUM)
#include "PasteboardPrivate.h"
#endif
namespace WebCore {
#if PLATFORM(MAC)
extern NSString *WebArchivePboardType;
extern NSString *WebSmartPastePboardType;
extern NSString *WebURLNamePboardType;
extern NSString *WebURLPboardType;
extern NSString *WebURLsWithTitlesPboardType;
#endif
class DocumentFragment;
class Frame;
class HitTestResult;
class KURL;
class Node;
class Range;
class ArchiveResource;
class Pasteboard {
WTF_MAKE_NONCOPYABLE(Pasteboard); WTF_MAKE_FAST_ALLOCATED;
public:
static Pasteboard* generalPasteboard();
void writePlainText(const String&);
void writePlainText(const String&, Frame*);
static NSArray* supportedPasteboardTypes();
void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*);
void clear();
bool canSmartReplace();
PassRefPtr<DocumentFragment> documentFragment(Frame*, PassRefPtr<Range>, bool allowPlainText, bool& chosePlainText);
String plainText(Frame* = 0);
#if PLATFORM(QT) || PLATFORM(CHROMIUM)
bool isSelectionMode() const;
void setSelectionMode(bool selectionMode);
#endif
#if PLATFORM(GTK)
void setHelper(PasteboardHelper*);
PasteboardHelper* helper();
~Pasteboard();
#endif
private:
Pasteboard();
#if PLATFORM(MAC)
PassRefPtr<DocumentFragment> documentFragmentWithImageResource(Frame* frame, PassRefPtr<ArchiveResource> resource);
#endif
PassRefPtr<DocumentFragment> documentFragmentForPasteboardItemAtIndex(Frame*, int index, bool allowPlainText, bool& chosePlainText);
#if PLATFORM(WIN)
HWND m_owner;
#endif
#if PLATFORM(QT) || PLATFORM(CHROMIUM)
bool m_selectionMode;
#endif
#if PLATFORM(CHROMIUM)
PasteboardPrivate p;
#endif
#if PLATFORM(GTK)
PasteboardHelper* m_helper;
#endif
};
}
#endif // Pasteboard_h