#include "chrome/browser/ui/views/controls/rich_hover_button.h"
#include "base/strings/string_util.h"
#include "chrome/browser/ui/views/accessibility/non_accessible_image_view.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/table_layout.h"
#include "ui/views/style/typography.h"
#include "ui/views/style/typography_provider.h"
#include "ui/views/view_class_properties.h"
namespace {
std::unique_ptr<views::View> CreateIconView(const ui::ImageModel& icon_image) { … }
class SubtitleLabelWrapper : public views::View { … };
BEGIN_METADATA(…)
}
RichHoverButton::RichHoverButton(
views::Button::PressedCallback callback,
const ui::ImageModel& main_image_icon,
const std::u16string& title_text,
const std::u16string& secondary_text,
const std::u16string& tooltip_text,
const std::u16string& subtitle_text,
std::optional<ui::ImageModel> action_image_icon,
std::optional<ui::ImageModel> state_icon)
: … { … }
void RichHoverButton::SetTitleText(const std::u16string& title_text) { … }
void RichHoverButton::SetSecondaryText(const std::u16string& secondary_text) { … }
void RichHoverButton::SetSubtitleText(const std::u16string& subtitle_text) { … }
void RichHoverButton::SetSubtitleMultiline(bool is_multiline) { … }
const views::Label* RichHoverButton::GetTitleViewForTesting() const { … }
const views::Label* RichHoverButton::GetSubTitleViewForTesting() const { … }
void RichHoverButton::UpdateAccessibleName() { … }
gfx::Size RichHoverButton::CalculatePreferredSize(
const views::SizeBounds& available_size) const { … }
void RichHoverButton::OnBoundsChanged(const gfx::Rect& previous_bounds) { … }
views::View* RichHoverButton::GetTooltipHandlerForPoint(
const gfx::Point& point) { … }
BEGIN_METADATA(…)