#include "extensions/common/api/user_scripts.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>
#include "extensions/common/api/extension_types.h"
UTF8ToUTF16;
namespace extensions {
namespace api {
namespace user_scripts {
const char* ToString(ExecutionWorld enum_param) { … }
ExecutionWorld ParseExecutionWorld(std::string_view enum_string) { … }
std::u16string GetExecutionWorldParseError(std::string_view enum_string) { … }
ScriptSource::ScriptSource()
{ … }
ScriptSource::~ScriptSource() = default;
ScriptSource::ScriptSource(ScriptSource&& rhs) noexcept = default;
ScriptSource& ScriptSource::operator=(ScriptSource&& rhs) noexcept = default;
ScriptSource ScriptSource::Clone() const { … }
bool ScriptSource::Populate(
const base::Value::Dict& dict, ScriptSource& out) { … }
bool ScriptSource::Populate(
const base::Value& value, ScriptSource& out) { … }
std::optional<ScriptSource> ScriptSource::FromValue(const base::Value::Dict& value) { … }
std::optional<ScriptSource> ScriptSource::FromValue(const base::Value& value) { … }
base::Value::Dict ScriptSource::ToValue() const { … }
RegisteredUserScript::RegisteredUserScript()
: … { … }
RegisteredUserScript::~RegisteredUserScript() = default;
RegisteredUserScript::RegisteredUserScript(RegisteredUserScript&& rhs) noexcept = default;
RegisteredUserScript& RegisteredUserScript::operator=(RegisteredUserScript&& rhs) noexcept = default;
RegisteredUserScript RegisteredUserScript::Clone() const { … }
bool RegisteredUserScript::Populate(
const base::Value::Dict& dict, RegisteredUserScript& out) { … }
bool RegisteredUserScript::Populate(
const base::Value& value, RegisteredUserScript& out) { … }
std::optional<RegisteredUserScript> RegisteredUserScript::FromValue(const base::Value::Dict& value) { … }
std::optional<RegisteredUserScript> RegisteredUserScript::FromValue(const base::Value& value) { … }
base::Value::Dict RegisteredUserScript::ToValue() const { … }
UserScriptFilter::UserScriptFilter()
{ … }
UserScriptFilter::~UserScriptFilter() = default;
UserScriptFilter::UserScriptFilter(UserScriptFilter&& rhs) noexcept = default;
UserScriptFilter& UserScriptFilter::operator=(UserScriptFilter&& rhs) noexcept = default;
UserScriptFilter UserScriptFilter::Clone() const { … }
bool UserScriptFilter::Populate(
const base::Value::Dict& dict, UserScriptFilter& out) { … }
bool UserScriptFilter::Populate(
const base::Value& value, UserScriptFilter& out) { … }
std::optional<UserScriptFilter> UserScriptFilter::FromValue(const base::Value::Dict& value) { … }
std::optional<UserScriptFilter> UserScriptFilter::FromValue(const base::Value& value) { … }
base::Value::Dict UserScriptFilter::ToValue() const { … }
WorldProperties::WorldProperties()
{ … }
WorldProperties::~WorldProperties() = default;
WorldProperties::WorldProperties(WorldProperties&& rhs) noexcept = default;
WorldProperties& WorldProperties::operator=(WorldProperties&& rhs) noexcept = default;
WorldProperties WorldProperties::Clone() const { … }
bool WorldProperties::Populate(
const base::Value::Dict& dict, WorldProperties& out) { … }
bool WorldProperties::Populate(
const base::Value& value, WorldProperties& out) { … }
std::optional<WorldProperties> WorldProperties::FromValue(const base::Value::Dict& value) { … }
std::optional<WorldProperties> WorldProperties::FromValue(const base::Value& value) { … }
base::Value::Dict WorldProperties::ToValue() const { … }
namespace Register {
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 GetScripts {
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<RegisteredUserScript>& scripts) { … }
}
namespace Unregister {
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 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() { … }
}
namespace ConfigureWorld {
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 GetWorldConfigurations {
base::Value::List Results::Create(const std::vector<WorldProperties>& worlds) { … }
}
namespace ResetWorldConfiguration {
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() { … }
}
}
}
}