WebNotificationCenter.h [plain text]
#ifndef WebNotificationCenter_H
#define WebNotificationCenter_H
#include "WebKit.h"
struct WebNotificationCenterPrivate;
class WebNotificationCenter final : public IWebNotificationCenter {
WTF_MAKE_FAST_ALLOCATED;
public:
static WebNotificationCenter* createInstance();
virtual HRESULT STDMETHODCALLTYPE QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject);
virtual ULONG STDMETHODCALLTYPE AddRef();
virtual ULONG STDMETHODCALLTYPE Release();
virtual HRESULT STDMETHODCALLTYPE defaultCenter(_COM_Outptr_opt_ IWebNotificationCenter**);
virtual HRESULT STDMETHODCALLTYPE addObserver(_In_opt_ IWebNotificationObserver*, _In_ BSTR notificationName, _In_opt_ IUnknown* anObject);
virtual HRESULT STDMETHODCALLTYPE postNotification(_In_opt_ IWebNotification*);
virtual HRESULT STDMETHODCALLTYPE postNotificationName(_In_ BSTR notificationName, _In_opt_ IUnknown* anObject, _In_opt_ IPropertyBag* userInfo);
virtual HRESULT STDMETHODCALLTYPE removeObserver(_In_opt_ IWebNotificationObserver*, _In_ BSTR notificationName, _In_opt_ IUnknown* anObject);
static IWebNotificationCenter* defaultCenterInternal();
void postNotificationInternal(IWebNotification* notification, BSTR notificationName, IUnknown* anObject);
private:
WebNotificationCenter();
~WebNotificationCenter();
ULONG m_refCount { 0 };
std::unique_ptr<WebNotificationCenterPrivate> d;
static IWebNotificationCenter* m_defaultCenter;
};
#endif // WebNotificationCenter_H