A NotificationDelegate is only really needed when dealing with the message center, native notifications should not need to require delegates in their notification objects
Here is our high level strategy for this:
Phase 1: Native notifications
1: Split extension and non persistent handlers
https://codereview.chromium.org/2875673002/
2: Upgrade https://cs.chromium.org/chromium/src/content/public/browser/notification_event_dispatcher.h to handle IPCs also for non persistent notifications. It will require keeping the a list of active renderers. At that point refactor the non_persistent notification handler to use the upgrade event dispatcher so that delegates are no longer needed for native notifications.
Phase 2: Message Center notifications:
We will not be able to fully get rid of delegates there but they can be created by the display service right before sending them to the message center so that none of the client code needs to use them.
1. Move the existing logic (including the handlers) from https://cs.chromium.org/chromium/src/chrome/browser/notifications/native_notification_display_service.h to the super class (which is now pure virtual but it will stop being so)
2. Get rid of message_center_display_service and make it implement the bridge interface instead. This will be the piece that creates the artificial delegates on demand when displaying right before sending them to the message center.
Comment 1 by miguelg@chromium.org
, May 10 2017