diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-20 14:17:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-10 10:26:38 +0200 |
commit | 9cfde2edf4736ae9533e7e1fac495a23ad905419 (patch) | |
tree | 4eca639f54719a8824a527ee6a40fb13b462b110 /src/core/platform_notification_service_qt.h | |
parent | 0a01998411de6a46af8d0b0ae13b8f401cd14a4b (diff) |
Adaptations for Chromium 75
Change-Id: Idad08244e0c749a9f70f5eb9f8cd236039b941b3
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/platform_notification_service_qt.h')
-rw-r--r-- | src/core/platform_notification_service_qt.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/core/platform_notification_service_qt.h b/src/core/platform_notification_service_qt.h index 65477dde2..12aa2619b 100644 --- a/src/core/platform_notification_service_qt.h +++ b/src/core/platform_notification_service_qt.h @@ -42,26 +42,28 @@ #include "content/public/browser/platform_notification_service.h" +namespace content { +class BrowserContext; +} + namespace QtWebEngineCore { class PlatformNotificationServiceQt : public content::PlatformNotificationService { public: - PlatformNotificationServiceQt(); + PlatformNotificationServiceQt(content::BrowserContext *browserContext); ~PlatformNotificationServiceQt() override; // Displays the notification described in |notification_data| to the user. A // closure through which the notification can be closed will be stored in the // |cancel_callback| argument. This method must be called on the UI thread. - void DisplayNotification(content::BrowserContext* browser_context, - const std::string& notification_id, + void DisplayNotification(const std::string& notification_id, const GURL& origin, const blink::PlatformNotificationData& notificationData, const blink::NotificationResources& notificationResources) override; // Displays the persistent notification described in |notification_data| to // the user. This method must be called on the UI thread. - void DisplayPersistentNotification(content::BrowserContext* browser_context, - const std::string& notification_id, + void DisplayPersistentNotification(const std::string& notification_id, const GURL& service_worker_origin, const GURL& origin, const blink::PlatformNotificationData& notification_data, @@ -69,22 +71,27 @@ public: // Closes the notification identified by |notification_id|. // This method must be called on the UI thread. - void CloseNotification(content::BrowserContext* browser_context, const std::string& notification_id) override; + void CloseNotification(const std::string& notification_id) override; // Closes the persistent notification identified by |persistent_notification_id|. // This method must be called on the UI thread. - void ClosePersistentNotification(content::BrowserContext* browser_context, const std::string& notification_id) override; + void ClosePersistentNotification(const std::string& notification_id) override; // Retrieves the ids of all currently displaying notifications and // posts |callback| with the result. - void GetDisplayedNotifications(content::BrowserContext* browser_context, DisplayedNotificationsCallback callback) override; + void GetDisplayedNotifications(DisplayedNotificationsCallback callback) override; // Reads the value of the next persistent notification ID from the profile and // increments the value, as it is called once per notification write. - virtual int64_t ReadNextPersistentNotificationId(content::BrowserContext* browser_context) override; + int64_t ReadNextPersistentNotificationId() override; + + void ScheduleTrigger(base::Time timestamp) override; + base::Time ReadNextTriggerTimestamp() override; // Records a given notification to UKM. - virtual void RecordNotificationUkmEvent(content::BrowserContext*, const content::NotificationDatabaseData&) override { } + void RecordNotificationUkmEvent(const content::NotificationDatabaseData&) override { } + + content::BrowserContext *browser_context; }; } // namespace QtWebEngineCore |