InjectedBundlePageEditorClient.h [plain text]
#ifndef InjectedBundlePageEditorClient_h
#define InjectedBundlePageEditorClient_h
#include "APIClient.h"
#include "WKBundlePage.h"
#include <WebCore/EditorInsertAction.h>
#include <WebCore/SharedBuffer.h>
#include <WebCore/TextAffinity.h>
#include <wtf/Forward.h>
namespace API {
template<> struct ClientTraits<WKBundlePageEditorClientBase> {
typedef std::tuple<WKBundlePageEditorClientV0, WKBundlePageEditorClientV1> Versions;
};
}
namespace WebCore {
class CSSStyleDeclaration;
class Node;
class Range;
class SharedBuffer;
}
namespace WebKit {
class WebFrame;
class WebPage;
class InjectedBundlePageEditorClient : public API::Client<WKBundlePageEditorClientBase> {
public:
bool shouldBeginEditing(WebPage*, WebCore::Range*);
bool shouldEndEditing(WebPage*, WebCore::Range*);
bool shouldInsertNode(WebPage*, WebCore::Node*, WebCore::Range* rangeToReplace, WebCore::EditorInsertAction);
bool shouldInsertText(WebPage*, StringImpl*, WebCore::Range* rangeToReplace, WebCore::EditorInsertAction);
bool shouldDeleteRange(WebPage*, WebCore::Range*);
bool shouldChangeSelectedRange(WebPage*, WebCore::Range* fromRange, WebCore::Range* toRange, WebCore::EAffinity affinity, bool stillSelecting);
bool shouldApplyStyle(WebPage*, WebCore::CSSStyleDeclaration*, WebCore::Range*);
void didBeginEditing(WebPage*, StringImpl* notificationName);
void didEndEditing(WebPage*, StringImpl* notificationName);
void didChange(WebPage*, StringImpl* notificationName);
void didChangeSelection(WebPage*, StringImpl* notificationName);
void willWriteToPasteboard(WebPage*, WebCore::Range*);
void getPasteboardDataForRange(WebPage*, WebCore::Range*, Vector<String>& pasteboardTypes, Vector<RefPtr<WebCore::SharedBuffer>>& pasteboardData);
void didWriteToPasteboard(WebPage*);
};
}
#endif // InjectedBundlePageEditorClient_h