#include "extensions/common/api/audio.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 audio {
const char* ToString(StreamType enum_param) { … }
StreamType ParseStreamType(std::string_view enum_string) { … }
std::u16string GetStreamTypeParseError(std::string_view enum_string) { … }
const char* ToString(DeviceType enum_param) { … }
DeviceType ParseDeviceType(std::string_view enum_string) { … }
std::u16string GetDeviceTypeParseError(std::string_view enum_string) { … }
AudioDeviceInfo::AudioDeviceInfo()
: … { … }
AudioDeviceInfo::~AudioDeviceInfo() = default;
AudioDeviceInfo::AudioDeviceInfo(AudioDeviceInfo&& rhs) noexcept = default;
AudioDeviceInfo& AudioDeviceInfo::operator=(AudioDeviceInfo&& rhs) noexcept = default;
AudioDeviceInfo AudioDeviceInfo::Clone() const { … }
bool AudioDeviceInfo::Populate(
const base::Value::Dict& dict, AudioDeviceInfo& out) { … }
bool AudioDeviceInfo::Populate(
const base::Value& value, AudioDeviceInfo& out) { … }
std::optional<AudioDeviceInfo> AudioDeviceInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<AudioDeviceInfo> AudioDeviceInfo::FromValue(const base::Value& value) { … }
base::Value::Dict AudioDeviceInfo::ToValue() const { … }
DeviceFilter::DeviceFilter()
{ … }
DeviceFilter::~DeviceFilter() = default;
DeviceFilter::DeviceFilter(DeviceFilter&& rhs) noexcept = default;
DeviceFilter& DeviceFilter::operator=(DeviceFilter&& rhs) noexcept = default;
DeviceFilter DeviceFilter::Clone() const { … }
bool DeviceFilter::Populate(
const base::Value::Dict& dict, DeviceFilter& out) { … }
bool DeviceFilter::Populate(
const base::Value& value, DeviceFilter& out) { … }
std::optional<DeviceFilter> DeviceFilter::FromValue(const base::Value::Dict& value) { … }
std::optional<DeviceFilter> DeviceFilter::FromValue(const base::Value& value) { … }
base::Value::Dict DeviceFilter::ToValue() const { … }
DeviceProperties::DeviceProperties()
{ … }
DeviceProperties::~DeviceProperties() = default;
DeviceProperties::DeviceProperties(DeviceProperties&& rhs) noexcept = default;
DeviceProperties& DeviceProperties::operator=(DeviceProperties&& rhs) noexcept = default;
DeviceProperties DeviceProperties::Clone() const { … }
bool DeviceProperties::Populate(
const base::Value::Dict& dict, DeviceProperties& out) { … }
bool DeviceProperties::Populate(
const base::Value& value, DeviceProperties& out) { … }
std::optional<DeviceProperties> DeviceProperties::FromValue(const base::Value::Dict& value) { … }
std::optional<DeviceProperties> DeviceProperties::FromValue(const base::Value& value) { … }
base::Value::Dict DeviceProperties::ToValue() const { … }
DeviceIdLists::DeviceIdLists()
{ … }
DeviceIdLists::~DeviceIdLists() = default;
DeviceIdLists::DeviceIdLists(DeviceIdLists&& rhs) noexcept = default;
DeviceIdLists& DeviceIdLists::operator=(DeviceIdLists&& rhs) noexcept = default;
DeviceIdLists DeviceIdLists::Clone() const { … }
bool DeviceIdLists::Populate(
const base::Value::Dict& dict, DeviceIdLists& out) { … }
bool DeviceIdLists::Populate(
const base::Value& value, DeviceIdLists& out) { … }
std::optional<DeviceIdLists> DeviceIdLists::FromValue(const base::Value::Dict& value) { … }
std::optional<DeviceIdLists> DeviceIdLists::FromValue(const base::Value& value) { … }
base::Value::Dict DeviceIdLists::ToValue() const { … }
MuteChangedEvent::MuteChangedEvent()
: … { … }
MuteChangedEvent::~MuteChangedEvent() = default;
MuteChangedEvent::MuteChangedEvent(MuteChangedEvent&& rhs) noexcept = default;
MuteChangedEvent& MuteChangedEvent::operator=(MuteChangedEvent&& rhs) noexcept = default;
MuteChangedEvent MuteChangedEvent::Clone() const { … }
bool MuteChangedEvent::Populate(
const base::Value::Dict& dict, MuteChangedEvent& out) { … }
bool MuteChangedEvent::Populate(
const base::Value& value, MuteChangedEvent& out) { … }
std::optional<MuteChangedEvent> MuteChangedEvent::FromValue(const base::Value::Dict& value) { … }
std::optional<MuteChangedEvent> MuteChangedEvent::FromValue(const base::Value& value) { … }
base::Value::Dict MuteChangedEvent::ToValue() const { … }
LevelChangedEvent::LevelChangedEvent()
: … { … }
LevelChangedEvent::~LevelChangedEvent() = default;
LevelChangedEvent::LevelChangedEvent(LevelChangedEvent&& rhs) noexcept = default;
LevelChangedEvent& LevelChangedEvent::operator=(LevelChangedEvent&& rhs) noexcept = default;
LevelChangedEvent LevelChangedEvent::Clone() const { … }
bool LevelChangedEvent::Populate(
const base::Value::Dict& dict, LevelChangedEvent& out) { … }
bool LevelChangedEvent::Populate(
const base::Value& value, LevelChangedEvent& out) { … }
std::optional<LevelChangedEvent> LevelChangedEvent::FromValue(const base::Value::Dict& value) { … }
std::optional<LevelChangedEvent> LevelChangedEvent::FromValue(const base::Value& value) { … }
base::Value::Dict LevelChangedEvent::ToValue() const { … }
namespace GetDevices {
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::vector<AudioDeviceInfo>& devices) { … }
}
namespace SetActiveDevices {
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() { … }
}
namespace SetProperties {
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() { … }
}
namespace GetMute {
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 value) { … }
}
namespace SetMute {
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() { … }
}
namespace OnLevelChanged {
const char kEventName[] = …;
base::Value::List Create(const LevelChangedEvent& event) { … }
}
namespace OnMuteChanged {
const char kEventName[] = …;
base::Value::List Create(const MuteChangedEvent& event) { … }
}
namespace OnDeviceListChanged {
const char kEventName[] = …;
base::Value::List Create(const std::vector<AudioDeviceInfo>& devices) { … }
}
}
}
}