#include "ui/touch_selection/touch_selection_magnifier_aura.h"
#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/color/color_provider_manager.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_delegate.h"
#include "ui/compositor/paint_recorder.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/shadow_value.h"
#include "ui/gfx/skia_paint_util.h"
#include "ui/native_theme/native_theme.h"
#include "ui/native_theme/native_theme_observer.h"
namespace ui {
namespace {
constexpr float kMagnifierScale = …;
constexpr int kMagnifierRadius = …;
constexpr base::TimeDelta kMagnifierTransitionDuration = …;
constexpr gfx::Size kMagnifierSize{ … };
constexpr int kMagnifierVerticalBoundsOffset = …;
constexpr int kMagnifierBorderThickness = …;
constexpr float kMagnifierBorderOpacity = …;
gfx::ShadowValues GetMagnifierShadowValues(SkColor key_shadow_color,
SkColor ambient_shadow_color) { … }
gfx::Outsets GetMagnifierShadowOutsets() { … }
gfx::Rect GetZoomLayerBounds() { … }
gfx::Size GetBorderLayerSize() { … }
gfx::Rect GetMagnifierLayerBounds(const gfx::Size& parent_container_size,
const gfx::Point& anchor_point) { … }
gfx::Point GetMagnifierSourceCenter(const gfx::Size& parent_container_size,
const gfx::Point& focus_center) { … }
}
class TouchSelectionMagnifierAura::BorderRenderer : public LayerDelegate { … };
TouchSelectionMagnifierAura::TouchSelectionMagnifierAura() { … }
TouchSelectionMagnifierAura::~TouchSelectionMagnifierAura() = default;
void TouchSelectionMagnifierAura::ShowFocusBound(Layer* parent,
const gfx::Point& focus_start,
const gfx::Point& focus_end) { … }
void TouchSelectionMagnifierAura::OnNativeThemeUpdated(
NativeTheme* observed_theme) { … }
gfx::Rect TouchSelectionMagnifierAura::GetZoomedContentsBoundsForTesting()
const { … }
gfx::Rect TouchSelectionMagnifierAura::GetMagnifierBoundsForTesting() const { … }
const Layer* TouchSelectionMagnifierAura::GetMagnifierParentForTesting() const { … }
void TouchSelectionMagnifierAura::CreateMagnifierLayer() { … }
}