diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
commit | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch) | |
tree | 8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h | |
parent | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff) | |
download | qtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz |
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h')
-rw-r--r-- | Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h b/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h index 3b32f0ade..61507394c 100644 --- a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h +++ b/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h @@ -27,10 +27,12 @@ #define WebNotificationManager_h #include "MessageID.h" +#include <WebCore/NotificationPresenter.h> #include <wtf/HashMap.h> #include <wtf/Noncopyable.h> #include <wtf/RefPtr.h> #include <wtf/Vector.h> +#include <wtf/text/StringHash.h> namespace CoreIPC { class ArgumentDecoder; @@ -39,6 +41,7 @@ class Connection; namespace WebCore { class Notification; +class SecurityOrigin; } namespace WebKit { @@ -52,12 +55,17 @@ public: explicit WebNotificationManager(WebProcess*); ~WebNotificationManager(); + void initialize(const HashMap<String, bool>& permissions); + bool show(WebCore::Notification*, WebPage*); void cancel(WebCore::Notification*, WebPage*); // This callback comes from WebCore, not messaged from the UI process. void didDestroyNotification(WebCore::Notification*, WebPage*); void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); + + // Looks in local cache for permission. If not found, returns DefaultDenied. + WebCore::NotificationPresenter::Permission policyForOrigin(WebCore::SecurityOrigin*) const; private: // Implemented in generated WebNotificationManagerMessageReceiver.cpp @@ -66,6 +74,8 @@ private: void didShowNotification(uint64_t notificationID); void didClickNotification(uint64_t notificationID); void didCloseNotifications(const Vector<uint64_t>& notificationIDs); + void didUpdateNotificationDecision(const String& originString, bool allowed); + void didRemoveNotificationDecisions(const Vector<String>& originStrings); WebProcess* m_process; @@ -75,6 +85,8 @@ private: typedef HashMap<uint64_t, RefPtr<WebCore::Notification> > NotificationIDMap; NotificationIDMap m_notificationIDMap; + + HashMap<String, bool> m_permissionsMap; #endif }; |