#include "fuchsia_web/webengine/browser/platform_notification_service_impl.h"
#include <set>
#include <string>
#include <utility>
#include "base/logging.h"
#include "base/notimplemented.h"
PlatformNotificationServiceImpl::PlatformNotificationServiceImpl() {
DETACH_FROM_SEQUENCE(sequence_checker_);
}
PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {}
void PlatformNotificationServiceImpl::DisplayNotification(
const std::string& notification_id,
const GURL& origin,
const GURL& document_url,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) {
LOG(WARNING) << "DisplayNotification " << notification_id << " from "
<< origin << " in " << document_url;
LOG(WARNING) << notification_data.title << ": " << notification_data.body;
}
void PlatformNotificationServiceImpl::DisplayPersistentNotification(
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) {
DisplayNotification(notification_id, origin, service_worker_scope,
notification_data, notification_resources);
}
void PlatformNotificationServiceImpl::CloseNotification(
const std::string& notification_id) {
NOTIMPLEMENTED();
}
void PlatformNotificationServiceImpl::ClosePersistentNotification(
const std::string& notification_id) {
NOTIMPLEMENTED();
}
void PlatformNotificationServiceImpl::GetDisplayedNotifications(
DisplayedNotificationsCallback callback) {
std::move(callback).Run(std::set<std::string>{}, false);
}
void PlatformNotificationServiceImpl::GetDisplayedNotificationsForOrigin(
const GURL& origin,
DisplayedNotificationsCallback callback) {
std::move(callback).Run(std::set<std::string>{}, false);
}
void PlatformNotificationServiceImpl::ScheduleTrigger(base::Time timestamp) {
NOTIMPLEMENTED();
}
base::Time PlatformNotificationServiceImpl::ReadNextTriggerTimestamp() {
return base::Time::Max();
}
int64_t PlatformNotificationServiceImpl::ReadNextPersistentNotificationId() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
static int64_t id = 0;
return id++;
}
void PlatformNotificationServiceImpl::RecordNotificationUkmEvent(
const content::NotificationDatabaseData& data) {
NOTIMPLEMENTED();
}