diff options
Diffstat (limited to 'src/core/platform_notification_service_qt.cpp')
-rw-r--r-- | src/core/platform_notification_service_qt.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
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<ProfileQt*>(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<ProfileQt*>(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<ProfileQt *>(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<ProfileQt *>(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 |