#include "chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.h"
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "cc/paint/paint_flags.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/favicon/favicon_utils.h"
#include "chrome/browser/ui/bookmarks/bookmark_utils_desktop.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
#include "chrome/browser/ui/tabs/tab_group_model.h"
#include "chrome/browser/ui/tabs/tab_group_theme.h"
#include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_button_util.h"
#include "chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_drag_data.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/location_bar/location_bar_util.h"
#include "chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h"
#include "chrome/grit/generated_resources.h"
#include "components/saved_tab_groups/saved_tab_group.h"
#include "components/tab_groups/tab_group_id.h"
#include "ui/accessibility/ax_enums.mojom-shared.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/dialog_model.h"
#include "ui/base/models/dialog_model_field.h"
#include "ui/base/models/dialog_model_menu_model_adapter.h"
#include "ui/base/models/image_model.h"
#include "ui/base/theme_provider.h"
#include "ui/base/ui_base_features.h"
#include "ui/base/ui_base_types.h"
#include "ui/color/color_id.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_utils.h"
namespace tab_groups {
namespace {
constexpr int kButtonSize = …;
constexpr float kButtonRadius = …;
constexpr float kVerticalInsets = …;
constexpr float kHorizontalInsets = …;
constexpr float kBorderThickness = …;
constexpr float kEmptyChipSize = …;
constexpr float kEmptyChipInsets = …;
constexpr float kEmptyChipCornerRadius = …;
}
SavedTabGroupButton::SavedTabGroupButton(const SavedTabGroup& group,
PressedCallback callback,
Browser* browser,
bool animations_enabled)
: … { … }
SavedTabGroupButton::~SavedTabGroupButton() = default;
void SavedTabGroupButton::UpdateButtonData(const SavedTabGroup& group) { … }
std::u16string SavedTabGroupButton::GetTooltipText(const gfx::Point& p) const { … }
bool SavedTabGroupButton::OnKeyPressed(const ui::KeyEvent& event) { … }
bool SavedTabGroupButton::IsTriggerableEvent(const ui::Event& e) { … }
void SavedTabGroupButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { … }
void SavedTabGroupButton::PaintButtonContents(gfx::Canvas* canvas) { … }
std::u16string SavedTabGroupButton::GetAccessibleNameForButton() const { … }
void SavedTabGroupButton::SetTextProperties(const SavedTabGroup& group) { … }
void SavedTabGroupButton::UpdateButtonLayout() { … }
std::unique_ptr<views::LabelButtonBorder>
SavedTabGroupButton::CreateDefaultBorder() const { … }
void SavedTabGroupButton::OnThemeChanged() { … }
void SavedTabGroupButton::WriteDragDataForView(View* sender,
const gfx::Point& press_pt,
ui::OSExchangeData* data) { … }
int SavedTabGroupButton::GetDragOperationsForView(View* sender,
const gfx::Point& p) { … }
bool SavedTabGroupButton::CanStartDragForView(View* sender,
const gfx::Point& press_pt,
const gfx::Point& p) { … }
BEGIN_METADATA(…)
}