Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: resolves the promise Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
index 391e789ecd7d822442dd059a7c261623a1597d2f..d0e112ada4a53a40971982539e4afe4d63629899 100644
--- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
+++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
@@ -5,6 +5,7 @@
#ifndef ServiceWorkerRegistrationNotifications_h
#define ServiceWorkerRegistrationNotifications_h
+#include "bindings/core/v8/CallbackPromiseAdapter.h"
#include "bindings/core/v8/ScriptPromise.h"
#include "core/dom/ContextLifecycleObserver.h"
#include "platform/Supplementable.h"
@@ -12,7 +13,8 @@
#include "platform/heap/Handle.h"
#include "platform/heap/HeapAllocator.h"
#include "platform/heap/Visitor.h"
-#include "public/platform/modules/notifications/WebNotificationManager.h"
+#include "public/platform/modules/notifications/notification.mojom-wtf.h"
+#include "public/platform/modules/notifications/notification_service.mojom-wtf.h"
#include "wtf/Noncopyable.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
@@ -33,6 +35,9 @@ struct WebNotificationData;
class ServiceWorkerRegistrationNotifications final : public GarbageCollectedFinalized<ServiceWorkerRegistrationNotifications>, public Supplement<ServiceWorkerRegistration>, public ContextLifecycleObserver {
USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationNotifications);
WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationNotifications);
+
+ using ShowNotificationCallbacks = CallbackPromiseAdapter<void, void>;
+
public:
~ServiceWorkerRegistrationNotifications();
static ScriptPromise showNotification(ScriptState*, ServiceWorkerRegistration&, const String& title, const NotificationOptions&, ExceptionState&);
@@ -49,8 +54,8 @@ private:
static const char* supplementName();
static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, ServiceWorkerRegistration&);
- void prepareShow(const WebNotificationData&, PassOwnPtr<WebNotificationShowCallbacks>);
- void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData&, PassOwnPtr<WebNotificationShowCallbacks>, NotificationResourcesLoader*);
+ void prepareShow(mojom::wtf::NotificationPtr, const mojom::wtf::NotificationService::ShowPersistentCallback& callback);
+ void didLoadResources(const mojom::wtf::NotificationService::ShowPersistentCallback& callback, NotificationResourcesLoader*, mojom::wtf::NotificationPtr notification);
Member<ServiceWorkerRegistration> m_registration;
HeapHashSet<Member<NotificationResourcesLoader>> m_loaders;

Powered by Google App Engine
This is Rietveld 408576698