#include <utility>
#include "third_party/blink/public/common/notifications/notification_mojom_traits.h"
#include "third_party/blink/public/mojom/notifications/notification.mojom.h"
namespace {
constexpr int kMaximumVibrationPatternLength = …;
constexpr int kMaximumVibrationDurationMs = …;
constexpr size_t kMaximumActions = …;
bool ValidateVibrationPattern(const std::vector<int>& vibration_pattern) { … }
bool ValidateActions(
const std::vector<blink::mojom::NotificationActionPtr>& actions) { … }
bool ValidateData(const std::vector<char>& data) { … }
}
namespace mojo {
bool StructTraits<blink::mojom::NotificationDataDataView,
blink::PlatformNotificationData>::
Read(blink::mojom::NotificationDataDataView notification_data,
blink::PlatformNotificationData* platform_notification_data) { … }
bool StructTraits<blink::mojom::NotificationResourcesDataView,
blink::NotificationResources>::
Read(blink::mojom::NotificationResourcesDataView in,
blink::NotificationResources* out) { … }
}