#ifndef WebUIClient_h
#define WebUIClient_h
#include "APIClient.h"
#include "WKPage.h"
#include "WebEvent.h"
#include "WebOpenPanelParameters.h"
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
class FloatRect;
class IntSize;
struct WindowFeatures;
}
namespace WebKit {
class APIObject;
class GeolocationPermissionRequestProxy;
class NativeWebKeyboardEvent;
class NativeWebWheelEvent;
class WebData;
class WebFrameProxy;
class WebPageProxy;
class WebSecurityOrigin;
class WebOpenPanelResultListenerProxy;
class WebUIClient : public APIClient<WKPageUIClient> {
public:
PassRefPtr<WebPageProxy> createNewPage(WebPageProxy*, const WebCore::WindowFeatures&, WebEvent::Modifiers, WebMouseEvent::Button);
void showPage(WebPageProxy*);
void close(WebPageProxy*);
void takeFocus(WebPageProxy*, WKFocusDirection);
void focus(WebPageProxy*);
void unfocus(WebPageProxy*);
void runJavaScriptAlert(WebPageProxy*, const String&, WebFrameProxy*);
bool runJavaScriptConfirm(WebPageProxy*, const String&, WebFrameProxy*);
String runJavaScriptPrompt(WebPageProxy*, const String&, const String&, WebFrameProxy*);
void setStatusText(WebPageProxy*, const String&);
void mouseDidMoveOverElement(WebPageProxy*, WebEvent::Modifiers, APIObject*);
void missingPluginButtonClicked(WebPageProxy*, const String& mimeType, const String& url, const String& pluginsPageURL);
bool implementsDidNotHandleKeyEvent() const;
void didNotHandleKeyEvent(WebPageProxy*, const NativeWebKeyboardEvent&);
bool implementsDidNotHandleWheelEvent() const;
void didNotHandleWheelEvent(WebPageProxy*, const NativeWebWheelEvent&);
bool toolbarsAreVisible(WebPageProxy*);
void setToolbarsAreVisible(WebPageProxy*, bool);
bool menuBarIsVisible(WebPageProxy*);
void setMenuBarIsVisible(WebPageProxy*, bool);
bool statusBarIsVisible(WebPageProxy*);
void setStatusBarIsVisible(WebPageProxy*, bool);
bool isResizable(WebPageProxy*);
void setIsResizable(WebPageProxy*, bool);
void setWindowFrame(WebPageProxy*, const WebCore::FloatRect&);
WebCore::FloatRect windowFrame(WebPageProxy*);
bool canRunBeforeUnloadConfirmPanel() const;
bool runBeforeUnloadConfirmPanel(WebPageProxy*, const String&, WebFrameProxy*);
void didDraw(WebPageProxy*);
void pageDidScroll(WebPageProxy*);
unsigned long long exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, const String& databaseName, const String& databaseDisplayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
bool runOpenPanel(WebPageProxy*, WebFrameProxy*, const WebOpenPanelParameters::Data&, WebOpenPanelResultListenerProxy*);
bool decidePolicyForGeolocationPermissionRequest(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, GeolocationPermissionRequestProxy*);
float headerHeight(WebPageProxy*, WebFrameProxy*);
float footerHeight(WebPageProxy*, WebFrameProxy*);
void drawHeader(WebPageProxy*, WebFrameProxy*, const WebCore::FloatRect&);
void drawFooter(WebPageProxy*, WebFrameProxy*, const WebCore::FloatRect&);
void printFrame(WebPageProxy*, WebFrameProxy*);
bool canRunModal() const;
void runModal(WebPageProxy*);
void didCompleteRubberBandForMainFrame(WebPageProxy*, const WebCore::IntSize&);
void saveDataToFileInDownloadsFolder(WebPageProxy*, const String& suggestedFilename, const String& mimeType, const String& originatingURLString, WebData*);
bool shouldInterruptJavaScript(WebPageProxy*);
};
}
#endif // WebUIClient_h