#ifndef CHROME_TEST_CHROMEDRIVER_SESSION_COMMANDS_H_
#define CHROME_TEST_CHROMEDRIVER_SESSION_COMMANDS_H_
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "chrome/test/chromedriver/command.h"
#include "chrome/test/chromedriver/net/sync_websocket_factory.h"
#include "chrome/test/chromedriver/session_connection_map.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
struct Capabilities;
class DeviceManager;
struct Session;
class Status;
struct InitSessionParams { … };
bool GetW3CSetting(const base::Value::Dict& params);
bool MergeCapabilities(const base::Value::Dict& always_match,
const base::Value::Dict& first_match,
base::Value::Dict& merged);
bool MatchCapabilities(const base::Value::Dict& capabilities);
Status ProcessCapabilities(const base::Value::Dict& params,
base::Value::Dict& result_capabilities);
Status ExecuteInitSession(const InitSessionParams& bound_params,
Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteQuit(bool allow_detach,
Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteBidiSessionEnd(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetSessionCapabilities(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetCurrentWindowHandle(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteClose(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetWindowHandles(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSwitchToWindow(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetTimeouts(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetTimeouts(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetScriptTimeout(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteImplicitlyWait(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteIsLoading(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteCreateVirtualSensor(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteUpdateVirtualSensor(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteRemoveVirtualSensor(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetVirtualSensorInformation(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetLocation(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetNetworkConnection(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetNetworkConditions(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetNetworkConnection(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetWindowPosition(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetWindowPosition(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetWindowSize(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetWindowSize(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetAvailableLogTypes(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGetLog(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteUploadFile(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetSPCTransactionMode(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteGenerateTestReport(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteSetTimeZone(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteCreateVirtualPressureSource(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteUpdateVirtualPressureSource(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ExecuteRemoveVirtualPressureSource(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
Status ForwardBidiCommand(Session* session,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value);
namespace internal {
Status ConfigureHeadlessSession(Session* session,
const Capabilities& capabilities);
Status ConfigureSession(Session* session,
const base::Value::Dict& params,
const base::Value::Dict*& desired_caps,
base::Value::Dict& merged_caps,
Capabilities* capabilities);
}
#endif