summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/notifications/NotificationClient.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/Modules/notifications/NotificationClient.h')
-rw-r--r--Source/WebCore/Modules/notifications/NotificationClient.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/WebCore/Modules/notifications/NotificationClient.h b/Source/WebCore/Modules/notifications/NotificationClient.h
index 22815bf7a..b03dfd92a 100644
--- a/Source/WebCore/Modules/notifications/NotificationClient.h
+++ b/Source/WebCore/Modules/notifications/NotificationClient.h
@@ -29,23 +29,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NotificationClient_h
-#define NotificationClient_h
+#pragma once
-#include "NotificationPermissionCallback.h"
-#include "VoidCallback.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/Forward.h>
namespace WebCore {
-class Document;
-class URL;
class Notification;
+class NotificationPermissionCallback;
class Page;
class ScriptExecutionContext;
+class VoidCallback;
class NotificationClient {
-
public:
enum Permission {
PermissionAllowed, // User has allowed notifications
@@ -71,16 +67,18 @@ public:
// Informs the presenter the controller attached to the page has been destroyed.
virtual void notificationControllerDestroyed() = 0;
-#if ENABLE(LEGACY_NOTIFICATIONS)
// Requests user permission to show desktop notifications from a particular
// script context. The callback parameter should be run when the user has
// made a decision.
- virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ virtual void requestPermission(ScriptExecutionContext*, RefPtr<VoidCallback>&&) = 0;
#endif
#if ENABLE(NOTIFICATIONS)
- virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback>) = 0;
+ virtual void requestPermission(ScriptExecutionContext*, RefPtr<NotificationPermissionCallback>&&) = 0;
#endif
+ virtual bool hasPendingPermissionRequests(ScriptExecutionContext*) const = 0;
+
// Cancel all outstanding requests for the ScriptExecutionContext
virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
@@ -91,8 +89,6 @@ protected:
virtual ~NotificationClient() { }
};
-void provideNotification(Page*, NotificationClient*);
+WEBCORE_EXPORT void provideNotification(Page*, NotificationClient*);
} // namespace WebCore
-
-#endif // NotificationClient_h