[webkit-changes] [WebKit/WebKit] 9d08f2: Implement webpushd built-in showNotification and g...

Brady Eidson noreply at github.com
Mon Jul 22 07:29:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d08f2e924fa8aacf079af47286772d3498f61c0
      https://github.com/WebKit/WebKit/commit/9d08f2e924fa8aacf079af47286772d3498f61c0
  Author: Brady Eidson <beidson at apple.com>
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
    M Source/WebCore/en.lproj/Localizable.strings
    M Source/WebKit/Configurations/WebKit.xcconfig
    M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp
    M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h
    M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
    M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h
    M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in
    A Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in
    M Source/WebKit/Scripts/process-entitlements.sh
    M Source/WebKit/UIProcess/WebPreferences.cpp
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp
    M Source/WebKit/webpushd/PushClientConnection.h
    M Source/WebKit/webpushd/PushClientConnection.messages.in
    M Source/WebKit/webpushd/PushClientConnection.mm
    M Source/WebKit/webpushd/WebPushDaemon.h
    M Source/WebKit/webpushd/WebPushDaemon.mm

  Log Message:
  -----------
  Implement webpushd built-in showNotification and getNotifications
rdar://131362923
https://bugs.webkit.org/show_bug.cgi?id=276823

Reviewed by Andy Estes.

Instead of delegating out notifications-related things to more than one client app implementation,
we should have webpushd just do as much of it all as possible.

A big glaring "FIXME" removed in this patch shows this was long planned, which made this
easier to finally start as some of the pieces were in place.

iOS Web.app-only for now, with some FIXMEs pointing out some missing macOS details.

This is also without tests, for now, as we don't API test on iOS devices.
The next patch that adds macOS details for notifications will also add API tests.

* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebKit/Configurations/WebKit.xcconfig:

* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
(WebKit::NetworkNotificationManager::showNotification):
(WebKit::NetworkNotificationManager::getNotifications):
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h:

* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::getNotifications):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:

* Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h: Added.
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:

* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in:
* Source/WebKit/Scripts/process-entitlements.sh:

* Source/WebKit/UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateBoolValueForKey):

* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

* Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::getNotifications):

* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::showNotification):
(WebPushD::PushClientConnection::getNotifications):
(WebPushD::PushClientConnection::associatedWebClipTitle const):

* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::platformShouldPlaySound):
(WebPushD::platformDefaultActionBundleIdentifier):
(WebPushD::platformNotificationCenterBundleIdentifier):
(WebPushD::platformNotificationSourceForDisplay):
(WebPushD::WebPushDaemon::showNotification):
(WebPushD::WebPushDaemon::getNotifications):

Canonical link: https://commits.webkit.org/281190@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list