RESOLVED FIXED 232021
Factor out some Notifications-specific messages from WebPageProxy messages
https://bugs.webkit.org/show_bug.cgi?id=232021
Summary Factor out some Notifications-specific messages from WebPageProxy messages
Brady Eidson
Reported 2021-10-20 10:35:44 PDT
Factor out some Notifications-specific messages from WebPageProxy messages Some of these messages will - in the future - sometimes be sent to Networking and sometimes sent to UIProcess for a WebPageProxy to handle. So let's factoring that out.
Attachments
Patch v1 (37.11 KB, patch)
2021-10-20 10:38 PDT, Brady Eidson
achristensen: review+
achristensen: commit-queue-
PFL v1 (37.70 KB, patch)
2021-10-20 11:21 PDT, Brady Eidson
ews-feeder: commit-queue-
PFL v2 (now with more explicit content) (37.70 KB, patch)
2021-10-20 11:31 PDT, Brady Eidson
ews-feeder: commit-queue-
PFL v3 - Now with more CMakeLists (37.94 KB, patch)
2021-10-20 11:46 PDT, Brady Eidson
no flags
PFL v4 - Now with fewer tabs (37.94 KB, patch)
2021-10-20 11:57 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2021-10-20 10:38:31 PDT
Created attachment 441895 [details] Patch v1
Alex Christensen
Comment 2 2021-10-20 10:43:24 PDT
Comment on attachment 441895 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=441895&action=review > Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:36 > +public: > + WebNotificationManagerMessageHandler(WebPageProxy&); You might consider making the constructor private and befriending WebPageProxy so that only WebPageProxy can construct it. We usually try to avoid friend, but I think in this case it would be a reasonable choice. > Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:39 > + void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, WebCore::NotificationDirection, const String& originString, uint64_t notificationID) final; nit: lang should be a full word. > Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:40 > + void cancelNotification(uint64_t notificationID) final; nit: this should be an ObjectIdentifier of some type.
Brady Eidson
Comment 3 2021-10-20 11:05:15 PDT
(In reply to Alex Christensen from comment #2) > Comment on attachment 441895 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=441895&action=review > > > Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:36 > > +public: > > + WebNotificationManagerMessageHandler(WebPageProxy&); > > You might consider making the constructor private and befriending > WebPageProxy so that only WebPageProxy can construct it. We usually try to > avoid friend, but I think in this case it would be a reasonable choice. > Agreed. > > Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:39 > > + void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, WebCore::NotificationDirection, const String& originString, uint64_t notificationID) final; > > nit: lang should be a full word. Lots of places to change this one... oooooff > > > Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:40 > > + void cancelNotification(uint64_t notificationID) final; > > nit: this should be an ObjectIdentifier of some type. https://bugs.webkit.org/show_bug.cgi?id=232023
Brady Eidson
Comment 4 2021-10-20 11:21:35 PDT
Darin Adler
Comment 5 2021-10-20 11:26:59 PDT
Comment on attachment 441895 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=441895&action=review >>> Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:36 >>> + WebNotificationManagerMessageHandler(WebPageProxy&); >> >> You might consider making the constructor private and befriending WebPageProxy so that only WebPageProxy can construct it. We usually try to avoid friend, but I think in this case it would be a reasonable choice. > > Agreed. Also a nice touch to use explicit for a constructor like this that happens to have exactly one argument but is not intended for type conversion.
Brady Eidson
Comment 6 2021-10-20 11:31:43 PDT
Created attachment 441908 [details] PFL v2 (now with more explicit content)
Brady Eidson
Comment 7 2021-10-20 11:46:28 PDT
Created attachment 441911 [details] PFL v3 - Now with more CMakeLists
Brady Eidson
Comment 8 2021-10-20 11:57:52 PDT
Created attachment 441913 [details] PFL v4 - Now with fewer tabs
EWS
Comment 9 2021-10-20 13:32:44 PDT
Committed r284564 (243306@main): <https://commits.webkit.org/243306@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441913 [details].
Radar WebKit Bug Importer
Comment 10 2021-10-20 13:33:18 PDT
Note You need to log in before you can comment on or make changes to this bug.