WebNotificationClient.h [plain text]
#ifndef WebNotificationClient_h
#define WebNotificationClient_h
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include <WebCore/NotificationClient.h>
namespace WebCore {
class NotificationPermissionCallback;
class ScriptExecutionContext;
class VoidCallback;
}
namespace WebKit {
class WebPage;
class WebNotificationClient : public WebCore::NotificationClient {
public:
WebNotificationClient(WebPage*);
virtual ~WebNotificationClient();
private:
bool show(WebCore::Notification*) override;
void cancel(WebCore::Notification*) override;
void clearNotifications(WebCore::ScriptExecutionContext*) override;
void notificationObjectDestroyed(WebCore::Notification*) override;
void notificationControllerDestroyed() override;
#if ENABLE(LEGACY_NOTIFICATIONS)
void requestPermission(WebCore::ScriptExecutionContext*, RefPtr<WebCore::VoidCallback>&&) override;
#endif
#if ENABLE(NOTIFICATIONS)
void requestPermission(WebCore::ScriptExecutionContext*, RefPtr<WebCore::NotificationPermissionCallback>&&) override;
#endif
void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) override;
bool hasPendingPermissionRequests(WebCore::ScriptExecutionContext*) const override;
NotificationClient::Permission checkPermission(WebCore::ScriptExecutionContext*) override;
WebPage* m_page;
};
}
#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#endif // WebNotificationClient_h