#include "chrome/common/extensions/api/notifications.h"
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "tools/json_schema_compiler/util.h"
#include <string_view>
UTF8ToUTF16;
namespace extensions {
namespace api {
namespace notifications {
const char* ToString(TemplateType enum_param) { … }
TemplateType ParseTemplateType(std::string_view enum_string) { … }
std::u16string GetTemplateTypeParseError(std::string_view enum_string) { … }
const char* ToString(PermissionLevel enum_param) { … }
PermissionLevel ParsePermissionLevel(std::string_view enum_string) { … }
std::u16string GetPermissionLevelParseError(std::string_view enum_string) { … }
NotificationItem::NotificationItem()
{ … }
NotificationItem::~NotificationItem() = default;
NotificationItem::NotificationItem(NotificationItem&& rhs) noexcept = default;
NotificationItem& NotificationItem::operator=(NotificationItem&& rhs) noexcept = default;
NotificationItem NotificationItem::Clone() const { … }
bool NotificationItem::Populate(
const base::Value::Dict& dict, NotificationItem& out) { … }
bool NotificationItem::Populate(
const base::Value& value, NotificationItem& out) { … }
std::optional<NotificationItem> NotificationItem::FromValue(const base::Value::Dict& value) { … }
std::optional<NotificationItem> NotificationItem::FromValue(const base::Value& value) { … }
base::Value::Dict NotificationItem::ToValue() const { … }
NotificationBitmap::NotificationBitmap()
: … { … }
NotificationBitmap::~NotificationBitmap() = default;
NotificationBitmap::NotificationBitmap(NotificationBitmap&& rhs) noexcept = default;
NotificationBitmap& NotificationBitmap::operator=(NotificationBitmap&& rhs) noexcept = default;
NotificationBitmap NotificationBitmap::Clone() const { … }
bool NotificationBitmap::Populate(
const base::Value::Dict& dict, NotificationBitmap& out) { … }
bool NotificationBitmap::Populate(
const base::Value& value, NotificationBitmap& out) { … }
std::optional<NotificationBitmap> NotificationBitmap::FromValue(const base::Value::Dict& value) { … }
std::optional<NotificationBitmap> NotificationBitmap::FromValue(const base::Value& value) { … }
base::Value::Dict NotificationBitmap::ToValue() const { … }
NotificationButton::NotificationButton()
{ … }
NotificationButton::~NotificationButton() = default;
NotificationButton::NotificationButton(NotificationButton&& rhs) noexcept = default;
NotificationButton& NotificationButton::operator=(NotificationButton&& rhs) noexcept = default;
NotificationButton NotificationButton::Clone() const { … }
bool NotificationButton::Populate(
const base::Value::Dict& dict, NotificationButton& out) { … }
bool NotificationButton::Populate(
const base::Value& value, NotificationButton& out) { … }
std::optional<NotificationButton> NotificationButton::FromValue(const base::Value::Dict& value) { … }
std::optional<NotificationButton> NotificationButton::FromValue(const base::Value& value) { … }
base::Value::Dict NotificationButton::ToValue() const { … }
NotificationOptions::NotificationOptions()
: … { … }
NotificationOptions::~NotificationOptions() = default;
NotificationOptions::NotificationOptions(NotificationOptions&& rhs) noexcept = default;
NotificationOptions& NotificationOptions::operator=(NotificationOptions&& rhs) noexcept = default;
NotificationOptions NotificationOptions::Clone() const { … }
bool NotificationOptions::Populate(
const base::Value::Dict& dict, NotificationOptions& out) { … }
bool NotificationOptions::Populate(
const base::Value& value, NotificationOptions& out) { … }
std::optional<NotificationOptions> NotificationOptions::FromValue(const base::Value::Dict& value) { … }
std::optional<NotificationOptions> NotificationOptions::FromValue(const base::Value& value) { … }
base::Value::Dict NotificationOptions::ToValue() const { … }
namespace Create {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create(const std::string& notification_id) { … }
}
namespace Update {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create(bool was_updated) { … }
}
namespace Clear {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create(bool was_cleared) { … }
}
namespace GetAll {
Results::Notifications::Notifications()
{ … }
Results::Notifications::~Notifications() = default;
Results::Notifications::Notifications(Notifications&& rhs) noexcept = default;
Results::Notifications& Results::Notifications::operator=(Notifications&& rhs) noexcept = default;
base::Value::Dict Results::Notifications::ToValue() const { … }
base::Value::List Results::Create(const Notifications& notifications) { … }
}
namespace GetPermissionLevel {
base::Value::List Results::Create(const PermissionLevel& level) { … }
}
namespace OnClosed {
const char kEventName[] = …;
base::Value::List Create(const std::string& notification_id, bool by_user) { … }
}
namespace OnClicked {
const char kEventName[] = …;
base::Value::List Create(const std::string& notification_id) { … }
}
namespace OnButtonClicked {
const char kEventName[] = …;
base::Value::List Create(const std::string& notification_id, int button_index) { … }
}
namespace OnPermissionLevelChanged {
const char kEventName[] = …;
base::Value::List Create(const PermissionLevel& level) { … }
}
namespace OnShowSettings {
const char kEventName[] = …;
base::Value::List Create() { … }
}
}
}
}