[webkit-changes] [WebKit/WebKit] 020436: Remove NetworkNotificationManager dependency on Ne...

bnham noreply at github.com
Mon Aug 19 11:54:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 020436abf345ae2df9bb772cb0ce94ac4219cbf4
      https://github.com/WebKit/WebKit/commit/020436abf345ae2df9bb772cb0ce94ac4219cbf4
  Author: Ben Nham <nham at apple.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkSession.cpp
    M Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm
    M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp
    M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h
    M Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.cpp
    M Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.h
    M Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h
    M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp

  Log Message:
  -----------
  Remove NetworkNotificationManager dependency on NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=278252
rdar://problem/134081837

Reviewed by Sihui Liu.

We want to be able to create a NetworkNotificationManager object without a corresponding
NetworkSession. This removes that dependency. As part of that project we also need certain methods
of NetworkNotificationManager to be public instead of private, so I also changed the visibility of
those methods.

I also did some drive-by cleanup:

- getPushPermissionState and getPermissionState did the exact same thing, so I removed the former.
- WebPushD::Connection similarly had a dependency on NetworkSession that I removed.
- Removed several unused methods in WebPushD::Connection (e.g. debug message logging)

* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::navigatorGetPushPermissionState):
* Source/WebKit/NetworkProcess/NetworkSession.cpp:
(WebKit::configurationWithHostAuditToken):
(WebKit::NetworkSession::NetworkSession):
* Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm:
(WebKit::WebPushD::Connection::newConnectionWasInitialized const):
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
(WebKit::NetworkNotificationManager::NetworkNotificationManager):
(WebKit::NetworkNotificationManager::showNotification):
(WebKit::NetworkNotificationManager::getNotifications):
(WebKit::NetworkNotificationManager::requestPermission):
(WebKit::NetworkNotificationManager::getPushSubscription):
(WebKit::NetworkNotificationManager::getPushPermissionState): Deleted.
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h:
(WebKit::NetworkNotificationManager::networkSession const): Deleted.
* Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.cpp:
(WebKit::WebPushD::Connection::Connection):
(WebKit::WebPushD::Connection::networkSession const): Deleted.
(WebKit::WebPushD::Connection::debugMessage): Deleted.
* Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.h:
* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h:
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::getPushPermissionState):

Canonical link: https://commits.webkit.org/282444@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