WebKitNotificationProvider.h [plain text]
#ifndef WebKitNotificationProvider_h
#define WebKitNotificationProvider_h
#include "WebKitPrivate.h"
#include "WebKitNotification.h"
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace API {
class Array;
}
namespace WebKit {
class WebKitNotificationProvider : public RefCounted<WebKitNotificationProvider> {
public:
virtual ~WebKitNotificationProvider();
static Ref<WebKitNotificationProvider> create(WebNotificationManagerProxy*);
void show(WebPageProxy*, const WebNotification&);
void cancel(const WebNotification&);
void clearNotifications(const API::Array*);
private:
WebKitNotificationProvider(WebNotificationManagerProxy*);
void cancelNotificationByID(uint64_t);
static void notificationCloseCallback(WebKitNotification*, WebKitNotificationProvider*);
RefPtr<WebNotificationManagerProxy> m_notificationManager;
HashMap<uint64_t, GRefPtr<WebKitNotification>> m_notifications;
};
}
#endif