From 9cfde2edf4736ae9533e7e1fac495a23ad905419 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 20 May 2019 14:17:47 +0200 Subject: Adaptations for Chromium 75 Change-Id: Idad08244e0c749a9f70f5eb9f8cd236039b941b3 Reviewed-by: Peter Varga --- src/core/platform_notification_service_qt.cpp | 31 ++++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'src/core/platform_notification_service_qt.cpp') diff --git a/src/core/platform_notification_service_qt.cpp b/src/core/platform_notification_service_qt.cpp index e9829c21f..d8abec17f 100644 --- a/src/core/platform_notification_service_qt.cpp +++ b/src/core/platform_notification_service_qt.cpp @@ -105,12 +105,13 @@ struct PersistentNotificationDelegate : UserNotificationController::Delegate { }; -PlatformNotificationServiceQt::PlatformNotificationServiceQt() {} +PlatformNotificationServiceQt::PlatformNotificationServiceQt(content::BrowserContext *browserContext) + : browser_context(browserContext) +{} PlatformNotificationServiceQt::~PlatformNotificationServiceQt() {} void PlatformNotificationServiceQt::DisplayNotification( - content::BrowserContext *browser_context, const std::string ¬ification_id, const GURL &origin, const blink::PlatformNotificationData ¬ificationData, @@ -131,7 +132,6 @@ void PlatformNotificationServiceQt::DisplayNotification( } void PlatformNotificationServiceQt::DisplayPersistentNotification( - content::BrowserContext *browser_context, const std::string ¬ification_id, const GURL &service_worker_origin, const GURL &origin, @@ -151,9 +151,7 @@ void PlatformNotificationServiceQt::DisplayPersistentNotification( client->showNotification(controller); } -void PlatformNotificationServiceQt::CloseNotification( - content::BrowserContext *browser_context, - const std::string ¬ification_id) +void PlatformNotificationServiceQt::CloseNotification(const std::string ¬ification_id) { Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); ProfileQt *profile = static_cast(browser_context); @@ -164,9 +162,7 @@ void PlatformNotificationServiceQt::CloseNotification( notificationController->closeNotification(); } -void PlatformNotificationServiceQt::ClosePersistentNotification( - content::BrowserContext *browser_context, - const std::string ¬ification_id) +void PlatformNotificationServiceQt::ClosePersistentNotification(const std::string ¬ification_id) { Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); ProfileQt *profile = static_cast(browser_context); @@ -177,9 +173,7 @@ void PlatformNotificationServiceQt::ClosePersistentNotification( notificationController->closeNotification(); } -void PlatformNotificationServiceQt::GetDisplayedNotifications( - content::BrowserContext *browser_context, - DisplayedNotificationsCallback callback) +void PlatformNotificationServiceQt::GetDisplayedNotifications(DisplayedNotificationsCallback callback) { Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); ProfileQt *profile = static_cast(browser_context); @@ -196,7 +190,7 @@ void PlatformNotificationServiceQt::GetDisplayedNotifications( std::move(callback).Run(std::move(movableStdStringSet), true /* supports_synchronization */); } -int64_t PlatformNotificationServiceQt::ReadNextPersistentNotificationId(content::BrowserContext *browser_context) +int64_t PlatformNotificationServiceQt::ReadNextPersistentNotificationId() { Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); auto prefs = static_cast(browser_context)->GetPrefs(); @@ -205,4 +199,15 @@ int64_t PlatformNotificationServiceQt::ReadNextPersistentNotificationId(content: return nextId; } +void PlatformNotificationServiceQt::ScheduleTrigger(base::Time /*timestamp*/) +{ + Q_UNIMPLEMENTED(); +} + +base::Time PlatformNotificationServiceQt::ReadNextTriggerTimestamp() +{ + Q_UNIMPLEMENTED(); + return base::Time::Max(); +} + } // namespace QtWebEngineCore -- cgit v1.2.3