diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h | |
parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
download | qtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h')
-rw-r--r-- | Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h index 98b472e82..02a2269e5 100644 --- a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h +++ b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h @@ -32,25 +32,27 @@ #include "WebNotificationProvider.h" #include <WebCore/NotificationClient.h> #include <wtf/HashMap.h> -#include <wtf/OwnPtr.h> #include <wtf/PassRefPtr.h> #include <wtf/text/StringHash.h> +namespace API { +class Array; +class SecurityOrigin; +} + namespace WebKit { -class ImmutableArray; -class WebContext; class WebPageProxy; -class WebSecurityOrigin; +class WebProcessPool; -class WebNotificationManagerProxy : public TypedAPIObject<APIObject::TypeNotificationManager>, public WebContextSupplement { +class WebNotificationManagerProxy : public API::ObjectImpl<API::Object::Type::NotificationManager>, public WebContextSupplement { public: static const char* supplementName(); - static PassRefPtr<WebNotificationManagerProxy> create(WebContext*); + static Ref<WebNotificationManagerProxy> create(WebProcessPool*); - void initializeProvider(const WKNotificationProvider*); + void initializeProvider(const WKNotificationProviderBase*); void populateCopyOfNotificationPermissions(HashMap<String, bool>&); void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t pageNotificationID); @@ -61,29 +63,29 @@ public: void providerDidShowNotification(uint64_t notificationID); void providerDidClickNotification(uint64_t notificationID); - void providerDidCloseNotifications(ImmutableArray* notificationIDs); - void providerDidUpdateNotificationPolicy(const WebSecurityOrigin*, bool allowed); - void providerDidRemoveNotificationPolicies(ImmutableArray* origins); + void providerDidCloseNotifications(API::Array* notificationIDs); + void providerDidUpdateNotificationPolicy(const API::SecurityOrigin*, bool allowed); + void providerDidRemoveNotificationPolicies(API::Array* origins); - using APIObject::ref; - using APIObject::deref; + using API::Object::ref; + using API::Object::deref; private: - explicit WebNotificationManagerProxy(WebContext*); + explicit WebNotificationManagerProxy(WebProcessPool*); typedef bool (*NotificationFilterFunction)(uint64_t pageID, uint64_t pageNotificationID, uint64_t desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs); void clearNotifications(WebPageProxy*, const Vector<uint64_t>& pageNotificationIDs, NotificationFilterFunction); // WebContextSupplement - virtual void contextDestroyed() OVERRIDE; - virtual void refWebContextSupplement() OVERRIDE; - virtual void derefWebContextSupplement() OVERRIDE; + virtual void processPoolDestroyed() override; + virtual void refWebContextSupplement() override; + virtual void derefWebContextSupplement() override; WebNotificationProvider m_provider; // Pair comprised of web page ID and the web process's notification ID - HashMap<uint64_t, pair<uint64_t, uint64_t> > m_globalNotificationMap; + HashMap<uint64_t, std::pair<uint64_t, uint64_t>> m_globalNotificationMap; // Key pair comprised of web page ID and the web process's notification ID; value pair comprised of global notification ID, and notification object - HashMap<pair<uint64_t, uint64_t>, pair<uint64_t, RefPtr<WebNotification> > > m_notifications; + HashMap<std::pair<uint64_t, uint64_t>, std::pair<uint64_t, RefPtr<WebNotification>>> m_notifications; }; } // namespace WebKit |