#include "ui/views/controls/focus_ring.h"
#include <algorithm>
#include <memory>
#include <optional>
#include <utility>
#include "base/i18n/rtl.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/theme_provider.h"
#include "ui/base/ui_base_features.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/cascading_property.h"
#include "ui/views/controls/focusable_border.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_utils.h"
DEFINE_UI_CLASS_PROPERTY_TYPE(…)
namespace views {
DEFINE_UI_CLASS_PROPERTY_KEY(…)
namespace {
DEFINE_UI_CLASS_PROPERTY_KEY(…)
constexpr int kMinFocusRingInset = …;
constexpr float kOutlineThickness = …;
constexpr float kFocusRingOutset = …;
bool IsPathUsable(const SkPath& path) { … }
SkColor GetPaintColor(FocusRing* focus_ring, bool valid) { … }
double GetCornerRadius(float halo_thickness) { … }
SkPath GetHighlightPathInternal(const View* view, float halo_thickness) { … }
}
constexpr float FocusRing::kDefaultHaloThickness;
constexpr float FocusRing::kDefaultHaloInset;
void FocusRing::Install(View* host) { … }
FocusRing* FocusRing::Get(View* host) { … }
const FocusRing* FocusRing::Get(const View* host) { … }
void FocusRing::Remove(View* host) { … }
FocusRing::~FocusRing() = default;
void FocusRing::SetPathGenerator(
std::unique_ptr<HighlightPathGenerator> generator) { … }
void FocusRing::SetInvalid(bool invalid) { … }
void FocusRing::SetHasFocusPredicate(const ViewPredicate& predicate) { … }
std::optional<ui::ColorId> FocusRing::GetColorId() const { … }
void FocusRing::SetColorId(std::optional<ui::ColorId> color_id) { … }
float FocusRing::GetHaloThickness() const { … }
float FocusRing::GetHaloInset() const { … }
void FocusRing::SetHaloThickness(float halo_thickness) { … }
void FocusRing::SetHaloInset(float halo_inset) { … }
void FocusRing::SetOutsetFocusRingDisabled(bool disable) { … }
bool FocusRing::GetOutsetFocusRingDisabled() const { … }
bool FocusRing::ShouldPaintForTesting() { … }
void FocusRing::Layout(PassKey) { … }
void FocusRing::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) { … }
void FocusRing::OnPaint(gfx::Canvas* canvas) { … }
SkRRect FocusRing::GetRingRoundRect() const { … }
void FocusRing::OnThemeChanged() { … }
void FocusRing::OnViewFocused(View* view) { … }
void FocusRing::OnViewBlurred(View* view) { … }
void FocusRing::OnViewLayoutInvalidated(View* view) { … }
FocusRing::FocusRing() { … }
void FocusRing::AdjustBounds(SkRect& rect) const { … }
void FocusRing::AdjustBounds(SkRRect& rect) const { … }
SkPath FocusRing::GetPath() const { … }
void FocusRing::RefreshLayer() { … }
bool FocusRing::ShouldSetOutsetFocusRing() const { … }
bool FocusRing::ShouldPaint() { … }
SkRRect FocusRing::RingRectFromPathRect(const SkRect& rect) const { … }
SkRRect FocusRing::RingRectFromPathRect(const SkRRect& rrect) const { … }
SkPath GetHighlightPath(const View* view, float halo_thickness) { … }
BEGIN_METADATA(…)
}