chromium/third_party/blink/common/notifications/notification_mojom_traits.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <utility>

#include "third_party/blink/public/common/notifications/notification_mojom_traits.h"
#include "third_party/blink/public/mojom/notifications/notification.mojom.h"

namespace {

// Maximum number of entries in a vibration pattern.
constexpr int kMaximumVibrationPatternLength =;

// Maximum duration of each vibration in a pattern.
constexpr int kMaximumVibrationDurationMs =;  // 10 seconds.

// Maximum number of developer-provided actions on a notification.
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

namespace mojo {

// static
bool StructTraits<blink::mojom::NotificationDataDataView,
                  blink::PlatformNotificationData>::
    Read(blink::mojom::NotificationDataDataView notification_data,
         blink::PlatformNotificationData* platform_notification_data) {}

// static
bool StructTraits<blink::mojom::NotificationResourcesDataView,
                  blink::NotificationResources>::
    Read(blink::mojom::NotificationResourcesDataView in,
         blink::NotificationResources* out) {}

}  // namespace mojo