#ifndef COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_COMMANDS_H_
#define COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_COMMANDS_H_
#include <memory>
#include <optional>
#include <string>
#include "components/sessions/core/serialized_user_agent_override.h"
#include "components/sessions/core/session_command.h"
#include "components/sessions/core/session_id.h"
#include "components/sessions/core/sessions_export.h"
namespace sessions {
class SessionCommand;
class SerializedNavigationEntry;
std::unique_ptr<SessionCommand> CreateUpdateTabNavigationCommand(
SessionCommand::id_type command_id,
SessionID tab_id,
const sessions::SerializedNavigationEntry& navigation);
std::unique_ptr<SessionCommand> CreateSetTabExtensionAppIDCommand(
SessionCommand::id_type command_id,
SessionID tab_id,
const std::string& extension_id);
std::unique_ptr<SessionCommand> CreateSetTabUserAgentOverrideCommand(
SessionCommand::id_type command_id,
SessionID tab_id,
const SerializedUserAgentOverride& user_agent_override);
std::unique_ptr<SessionCommand> CreateSetWindowAppNameCommand(
SessionCommand::id_type command_id,
SessionID window_id,
const std::string& app_name);
std::unique_ptr<SessionCommand> CreateSetWindowUserTitleCommand(
SessionCommand::id_type command_id,
SessionID window_id,
const std::string& app_name);
std::unique_ptr<SessionCommand> CreateAddExtraDataCommand(
SessionCommand::id_type command,
SessionID session_id,
const std::string& key,
const std::string& data);
bool RestoreUpdateTabNavigationCommand(
const SessionCommand& command,
sessions::SerializedNavigationEntry* navigation,
SessionID* tab_id);
bool RestoreSetTabExtensionAppIDCommand(const SessionCommand& command,
SessionID* tab_id,
std::string* extension_app_id);
bool RestoreSetTabUserAgentOverrideCommand2(
const SessionCommand& command,
SessionID* tab_id,
std::string* user_agent_override,
std::optional<std::string>* opaque_ua_metadata_override);
bool RestoreSetTabUserAgentOverrideCommand(const SessionCommand& command,
SessionID* tab_id,
std::string* user_agent_override);
bool RestoreSetWindowAppNameCommand(const SessionCommand& command,
SessionID* window_id,
std::string* app_name);
bool RestoreSetWindowUserTitleCommand(const SessionCommand& command,
SessionID* window_id,
std::string* user_title);
bool RestoreAddExtraDataCommand(const SessionCommand& command,
SessionID* session_id,
std::string* key,
std::string* data);
}
#endif