chromium/ui/views/window/frame_caption_button.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/window/frame_caption_button.h"

#include <memory>
#include <utility>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "cc/paint/paint_flags.h"
#include "ui/base/hit_test.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_id.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rrect_f.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_ripple.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/window/hit_test_utils.h"

namespace views {

namespace {

// Ink drop parameters.
constexpr float kInkDropVisibleOpacity =;

// The duration of the fade out animation of the old icon during a crossfade
// animation as a ratio of the duration of |swap_images_animation_|.
constexpr float kFadeOutRatio =;

// The ratio applied to the button's alpha when the button is disabled.
constexpr float kDisabledButtonAlphaRatio =;

}  // namespace

// Custom highlight path generator for clipping ink drops and drawing focus
// rings.
class FrameCaptionButton::HighlightPathGenerator
    : public views::HighlightPathGenerator {};

FrameCaptionButton::FrameCaptionButton(PressedCallback callback,
                                       CaptionButtonIcon icon,
                                       int hit_test_type)
    :{}

FrameCaptionButton::~FrameCaptionButton() = default;

// static
SkColor FrameCaptionButton::GetButtonColor(SkColor background_color) {}

// static
float FrameCaptionButton::GetInactiveButtonColorAlphaRatio() {}

void FrameCaptionButton::SetImage(CaptionButtonIcon icon,
                                  Animate animate,
                                  const gfx::VectorIcon& icon_definition) {}

bool FrameCaptionButton::IsAnimatingImageSwap() const {}

void FrameCaptionButton::SetAlpha(SkAlpha alpha) {}

void FrameCaptionButton::OnGestureEvent(ui::GestureEvent* event) {}

views::PaintInfo::ScaleType FrameCaptionButton::GetPaintScaleType() const {}

void FrameCaptionButton::SetBackgroundColor(SkColor background_color) {}

void FrameCaptionButton::SetIconColorId(ui::ColorId icon_color_id) {}

SkColor FrameCaptionButton::GetBackgroundColor() const {}

void FrameCaptionButton::SetInkDropCornerRadius(int ink_drop_corner_radius) {}

int FrameCaptionButton::GetInkDropCornerRadius() const {}

base::CallbackListSubscription
FrameCaptionButton::AddBackgroundColorChangedCallback(
    PropertyChangedCallback callback) {}

void FrameCaptionButton::SetPaintAsActive(bool paint_as_active) {}

bool FrameCaptionButton::GetPaintAsActive() const {}

void FrameCaptionButton::DrawHighlight(gfx::Canvas* canvas,
                                       cc::PaintFlags flags) {}

void FrameCaptionButton::DrawIconContents(gfx::Canvas* canvas,
                                          gfx::ImageSkia image,
                                          int x,
                                          int y,
                                          cc::PaintFlags flags) {}

gfx::Size FrameCaptionButton::GetInkDropSize() const {}

gfx::Insets FrameCaptionButton::GetInkdropInsets(
    const gfx::Size& button_size) const {}

void FrameCaptionButton::MaybeRefreshIconAndInkdropBaseColor() {}

void FrameCaptionButton::PaintButtonContents(gfx::Canvas* canvas) {}

void FrameCaptionButton::OnThemeChanged() {}

SkAlpha FrameCaptionButton::GetAlphaForIcon(SkAlpha base_alpha) const {}

void FrameCaptionButton::UpdateInkDropBaseColor() {}

BEGIN_METADATA()

}  // namespace views

DEFINE_ENUM_CONVERTERS()