#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_IOS_H_
#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_IOS_H_
#include <memory>
#include "base/component_export.h"
#include "ui/accessibility/platform/ax_platform_node_base.h"
namespace ui {
class AXPlatformNodeIOSDelegate {
public:
virtual float GetDeviceScaleFactor() const = 0;
};
class COMPONENT_EXPORT(AX_PLATFORM) AXPlatformNodeIOS
: public AXPlatformNodeBase {
public:
AXPlatformNodeIOS(const AXPlatformNodeIOS&) = delete;
AXPlatformNodeIOS& operator=(const AXPlatformNodeIOS&) = delete;
void SetIOSDelegate(AXPlatformNodeIOSDelegate* ios_delegate);
AXPlatformNodeIOSDelegate* GetIOSDelegate() const;
void Init(AXPlatformNodeDelegate& delegate) override;
void Destroy() override;
gfx::NativeViewAccessible GetNativeViewAccessible() override;
protected:
AXPlatformNodeIOS();
~AXPlatformNodeIOS() override;
private:
friend AXPlatformNode::Pointer AXPlatformNode::Create(
AXPlatformNodeDelegate& delegate);
void CreateNativeWrapper();
struct ObjCStorage;
std::unique_ptr<ObjCStorage> objc_storage_;
raw_ptr<AXPlatformNodeIOSDelegate> ios_delegate_;
};
}
#endif