#ifndef ASH_ACCESSIBILITY_UI_FOCUS_RING_CONTROLLER_H_
#define ASH_ACCESSIBILITY_UI_FOCUS_RING_CONTROLLER_H_
#include <memory>
#include "ash/accessibility/ui/focus_ring_layer.h"
#include "ash/accessibility/ui/native_focus_watcher.h"
#include "ash/ash_export.h"
#include "base/memory/raw_ptr.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/widget_observer.h"
namespace ash {
class ASH_EXPORT FocusRingController : public AccessibilityLayerDelegate,
public NativeFocusObserver {
public:
FocusRingController();
FocusRingController(const FocusRingController&) = delete;
FocusRingController& operator=(const FocusRingController&) = delete;
~FocusRingController() override;
void SetVisible(bool visible);
void OnNativeFocusChanged(const gfx::Rect& bounds_in_screen) override;
void OnNativeFocusCleared() override;
private:
void OnDeviceScaleFactorChanged() override;
void UpdateFocusRing();
void ClearFocusRing();
bool visible_ = false;
std::unique_ptr<NativeFocusWatcher> native_focus_watcher_;
gfx::Rect bounds_in_screen_;
std::unique_ptr<FocusRingLayer> focus_ring_layer_;
};
}
#endif