diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/notifications/NotificationClient.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/Modules/notifications/NotificationClient.h')
-rw-r--r-- | Source/WebCore/Modules/notifications/NotificationClient.h | 24 |
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 |