Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c48c059497e4001943f243e8046eeae28aea8cbc
      
https://github.com/WebKit/WebKit/commit/c48c059497e4001943f243e8046eeae28aea8cbc
  Author: Ben Nham <[email protected]>
  Date:   2024-07-08 (Mon, 08 Jul 2024)

  Changed paths:
    M Source/WebKit/Shared/WebPushDaemonConstants.h
    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
    M Source/WebKit/webpushd/WebPushDaemonMain.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  -----------
  Add getPendingPushMessage IPC to webpushd
https://bugs.webkit.org/show_bug.cgi?id=276282
rdar://131225000

Reviewed by Brady Eidson.

Currently clients fetch push messages via the getPendingPushMessages IPC, and 
we count on them to
call incrementSilentPushCount if the associated service worker doesn't call
ServiceWorkerRegistration.showNotification as part of handling the push event.

We'd like to eventually remove the incrementSilentPushCount IPC. Instead, this 
patch introduces a
new getPendingPushMessage IPC which also implicitly starts a 30 second timer 
waiting for the client
to call showNotification. If the timer expires, then we automatically increment 
the silent push
count for the push subscription in the daemon.

* Source/WebKit/Shared/WebPushDaemonConstants.h:
* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::getPendingPushMessage):
(WebPushD::PushClientConnection::didShowNotificationForTesting):
* Source/WebKit/webpushd/WebPushDaemon.h:
(WebPushD::WebPushDaemon::setMachServiceName): Deleted.
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::startMockPushService):
(WebPushD::WebPushDaemon::injectPushMessageForTesting):
(WebPushD::WebPushDaemon::handleIncomingPush):
(WebPushD::WebPushDaemon::notifyClientPushMessageIsAvailable):
(WebPushD::WebPushDaemon::silentPushTimeout const):
(WebPushD::WebPushDaemon::rescheduleSilentPushTimer):
(WebPushD::WebPushDaemon::silentPushTimerFired):
(WebPushD::WebPushDaemon::didShowNotificationImpl):
(WebPushD::WebPushDaemon::getPendingPushMessage):
(WebPushD::WebPushDaemon::getPendingPushMessages):
(WebPushD::WebPushDaemon::didShowNotificationForTesting):
* Source/WebKit/webpushd/WebPushDaemonMain.mm:
(WebKit::WebPushDaemonMain):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::defaultWebPushDaemonConfiguration):
(TestWebKitAPI::createAndConfigureConnectionToService):
(TestWebKitAPI::TEST(WebPushD, BasicCommunication)):
(TestWebKitAPI::sendConfigurationWithAuditToken): Deleted.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to