#include "chrome/common/extensions/api/sessions.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 "chrome/common/extensions/api/tabs.h"
#include "chrome/common/extensions/api/windows.h"
UTF8ToUTF16;
namespace extensions {
namespace api {
namespace sessions {
const int MAX_SESSION_RESULTS = …;
Filter::Filter()
{ … }
Filter::~Filter() = default;
Filter::Filter(Filter&& rhs) noexcept = default;
Filter& Filter::operator=(Filter&& rhs) noexcept = default;
Filter Filter::Clone() const { … }
bool Filter::Populate(
const base::Value::Dict& dict, Filter& out) { … }
bool Filter::Populate(
const base::Value& value, Filter& out) { … }
std::optional<Filter> Filter::FromValue(const base::Value::Dict& value) { … }
std::optional<Filter> Filter::FromValue(const base::Value& value) { … }
base::Value::Dict Filter::ToValue() const { … }
Session::Session()
: … { … }
Session::~Session() = default;
Session::Session(Session&& rhs) noexcept = default;
Session& Session::operator=(Session&& rhs) noexcept = default;
Session Session::Clone() const { … }
bool Session::Populate(
const base::Value::Dict& dict, Session& out) { … }
bool Session::Populate(
const base::Value& value, Session& out) { … }
std::optional<Session> Session::FromValue(const base::Value::Dict& value) { … }
std::optional<Session> Session::FromValue(const base::Value& value) { … }
base::Value::Dict Session::ToValue() const { … }
Device::Device()
{ … }
Device::~Device() = default;
Device::Device(Device&& rhs) noexcept = default;
Device& Device::operator=(Device&& rhs) noexcept = default;
Device Device::Clone() const { … }
bool Device::Populate(
const base::Value::Dict& dict, Device& out) { … }
bool Device::Populate(
const base::Value& value, Device& out) { … }
std::optional<Device> Device::FromValue(const base::Value::Dict& value) { … }
std::optional<Device> Device::FromValue(const base::Value& value) { … }
base::Value::Dict Device::ToValue() const { … }
namespace GetRecentlyClosed {
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<Session>& sessions) { … }
}
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<Device>& devices) { … }
}
namespace Restore {
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 Session& restored_session) { … }
}
namespace OnChanged {
const char kEventName[] = …;
base::Value::List Create() { … }
}
}
}
}