chromium/chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.cc

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

#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 {
// The max height of the button and the max width of a button with no title.
constexpr int kButtonSize =;
// The corner radius for the button.
constexpr float kButtonRadius =;
// The amount of insets above and below the text.
constexpr float kVerticalInsets =;
// The amount of insets before and after the text.
constexpr float kHorizontalInsets =;
// The width of the outline of the button when open in the Tab Strip.
constexpr float kBorderThickness =;
// The size of the squircle (rounded rect) in a button with no text.
constexpr float kEmptyChipSize =;
// The amount of padding around the squircle (rounded rect).
constexpr float kEmptyChipInsets =;
// The radius of the squircle (rounded rect).
constexpr float kEmptyChipCornerRadius =;
}  // namespace

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()

}  // namespace tab_groups