#ifndef WebUIClient_h
#define WebUIClient_h
#include "APIClient.h"
#include "WKPage.h"
#include "WebEvent.h"
#include "WebHitTestResult.h"
#include "WebOpenPanelParameters.h"
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
class FloatRect;
class IntSize;
class ResourceRequest;
struct WindowFeatures;
}
namespace WebKit {
class APIObject;
class GeolocationPermissionRequestProxy;
class ImmutableDictionary;
class NativeWebKeyboardEvent;
class NativeWebWheelEvent;
class NotificationPermissionRequest;
class WebColorPickerResultListenerProxy;
class WebData;
class WebFrameProxy;
class WebPageProxy;
class WebSecurityOrigin;
class WebOpenPanelResultListenerProxy;
class WebUIClient : public APIClient<WKPageUIClient, kWKPageUIClientCurrentVersion> {
public:
PassRefPtr<WebPageProxy> createNewPage(WebPageProxy*, const WebCore::ResourceRequest&, 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*, const WebHitTestResult::Data&, WebEvent::Modifiers, APIObject*);
void unavailablePluginButtonClicked(WebPageProxy*, WKPluginUnavailabilityReason, ImmutableDictionary*);
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*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*);
bool decidePolicyForGeolocationPermissionRequest(WebPageProxy*, WebFrameProxy*, WebSecurityOrigin*, GeolocationPermissionRequestProxy*);
bool decidePolicyForNotificationPermissionRequest(WebPageProxy*, WebSecurityOrigin*, NotificationPermissionRequest*);
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 saveDataToFileInDownloadsFolder(WebPageProxy*, const String& suggestedFilename, const String& mimeType, const String& originatingURLString, WebData*);
bool shouldInterruptJavaScript(WebPageProxy*);
#if ENABLE(INPUT_TYPE_COLOR)
bool showColorPicker(WebPageProxy*, const String&, WebColorPickerResultListenerProxy*);
bool hideColorPicker(WebPageProxy*);
#endif
};
}
#endif // WebUIClient_h