#ifndef HEADLESS_LIB_BROWSER_PROTOCOL_EMULATION_HANDLER_H_
#define HEADLESS_LIB_BROWSER_PROTOCOL_EMULATION_HANDLER_H_
#include "headless/lib/browser/protocol/domain_handler.h"
#include "headless/lib/browser/protocol/emulation.h"
namespace headless::protocol {
class EmulationHandler : public DomainHandler, public Emulation::Backend {
public:
EmulationHandler();
EmulationHandler(const EmulationHandler&) = delete;
EmulationHandler& operator=(const EmulationHandler&) = delete;
~EmulationHandler() override;
private:
void Wire(UberDispatcher* dispatcher) override;
Response Disable() override;
Response GetScreenInfos(
std::unique_ptr<protocol::Array<protocol::Emulation::ScreenInfo>>*
out_screen_infos) override;
Response AddScreen(
int left,
int top,
int width,
int height,
std::unique_ptr<protocol::Emulation::WorkAreaInsets> work_area_insets,
std::optional<double> device_pixel_ratio,
std::optional<int> rotation,
std::optional<int> color_depth,
std::optional<String> label,
std::optional<bool> is_internal,
std::unique_ptr<protocol::Emulation::ScreenInfo>* out_screen_info)
override;
Response RemoveScreen(const String& screen_id) override;
};
}
#endif