[webkit-changes] [WebKit/WebKit] 4d6ca3: Add dataStoreIdentifier getter to WKNotificationRef
bnham
noreply at github.com
Mon Feb 20 09:19:32 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4d6ca3abbe3be49adfb405146a324b0f5edde083
https://github.com/WebKit/WebKit/commit/4d6ca3abbe3be49adfb405146a324b0f5edde083
Author: Ben Nham <nham at apple.com>
Date: 2023-02-20 (Mon, 20 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/API/C/WKNotification.cpp
M Source/WebKit/UIProcess/API/C/WKNotification.h
M Source/WebKit/UIProcess/Notifications/WebNotification.cpp
M Source/WebKit/UIProcess/Notifications/WebNotification.h
M Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp
M Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
M Tools/TestWebKitAPI/TestNotificationProvider.cpp
M Tools/TestWebKitAPI/TestNotificationProvider.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
Log Message:
-----------
Add dataStoreIdentifier getter to WKNotificationRef
https://bugs.webkit.org/show_bug.cgi?id=252527
rdar://problem/105626458
Reviewed by Brady Eidson.
When we show a persistent notification, we need to tell the embedder the data store identifier that
the notification is associated with. This way the embedder will know which data store to send
notificationclick and notificationclose events to when the notification is eventually clicked or
closed.
To do this, we add a dataStoreIdentifier getter to WebNotification and WKNotificationRef that is
populated when WebNotificationManagerProxy shows a persistent notification.
* Source/WebKit/UIProcess/API/C/WKNotification.cpp:
(WKNotificationCopyDataStoreIdentifier):
* Source/WebKit/UIProcess/API/C/WKNotification.h:
* Source/WebKit/UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* Source/WebKit/UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::createNonPersistent):
(WebKit::WebNotification::createPersistent):
(WebKit::WebNotification::dataStoreIdentifier const):
(WebKit::WebNotification::create): Deleted.
* Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::showImpl):
* Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::showServiceWorkerNotification):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::configuration const):
(WebKit::WebsiteDataStore::configuration): Deleted.
* Tools/TestWebKitAPI/TestNotificationProvider.cpp:
(TestWebKitAPI::TestNotificationProvider::showWebNotification):
* Tools/TestWebKitAPI/TestNotificationProvider.h:
(TestWebKitAPI::TestNotificationProvider::lastNotificationDataStoreIdentifier const):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
Canonical link: https://commits.webkit.org/260540@main
More information about the webkit-changes
mailing list