#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVICE_ORIENTATION_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVICE_ORIENTATION_HANDLER_H_
#include <memory>
#include "base/memory/raw_ptr.h"
#include "content/browser/devtools/protocol/device_orientation.h"
#include "content/browser/devtools/protocol/devtools_domain_handler.h"
namespace content {
class RenderFrameHostImpl;
class ScopedVirtualSensorForDevTools;
class WebContentsImpl;
namespace protocol {
class DeviceOrientationHandler : public DevToolsDomainHandler,
public DeviceOrientation::Backend {
public:
DeviceOrientationHandler();
DeviceOrientationHandler(const DeviceOrientationHandler&) = delete;
DeviceOrientationHandler& operator=(const DeviceOrientationHandler&) = delete;
~DeviceOrientationHandler() override;
private:
WebContentsImpl* GetWebContents();
void Wire(UberDispatcher* dispatcher) override;
void SetRenderer(int process_host_id,
RenderFrameHostImpl* frame_host) override;
Response Disable() override;
Response ClearDeviceOrientationOverride() override;
void SetDeviceOrientationOverride(
double alpha,
double beta,
double gamma,
std::unique_ptr<SetDeviceOrientationOverrideCallback> callback) override;
raw_ptr<RenderFrameHostImpl> frame_host_ = nullptr;
std::unique_ptr<ScopedVirtualSensorForDevTools> virtual_sensor_;
};
}
}
#endif