chromium/chrome/browser/ui/views/tabs/tab_group_header.cc

// Copyright 2019 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/tabs/tab_group_header.h"

#include <memory>
#include <utility>

#include "base/feature_list.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/color/chrome_color_id.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/tab_style.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h"
#include "chrome/browser/ui/views/tabs/tab_group_style.h"
#include "chrome/browser/ui/views/tabs/tab_group_underline.h"
#include "chrome/browser/ui/views/tabs/tab_slot_controller.h"
#include "chrome/browser/ui/views/tabs/tab_slot_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
#include "chrome/browser/ui/views/tabs/tab_strip_layout.h"
#include "chrome/browser/ui/views/tabs/tab_strip_types.h"
#include "chrome/grit/generated_resources.h"
#include "components/saved_tab_groups/features.h"
#include "components/tab_groups/tab_group_color.h"
#include "components/tab_groups/tab_group_id.h"
#include "components/tab_groups/tab_group_visual_data.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_id.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/focus_ring.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/flex_layout_types.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/view.h"
#include "ui/views/view_class_properties.h"

namespace {

// The amount of padding between the label and the sync icon.
constexpr int kSyncIconPaddingFromLabel =;

class TabGroupHighlightPathGenerator : public views::HighlightPathGenerator {};

}  // namespace

TabGroupHeader::TabGroupHeader(TabSlotController& tab_slot_controller,
                               const tab_groups::TabGroupId& group,
                               const TabGroupStyle& style)
    :{}

TabGroupHeader::~TabGroupHeader() = default;

bool TabGroupHeader::OnKeyPressed(const ui::KeyEvent& event) {}

bool TabGroupHeader::OnMousePressed(const ui::MouseEvent& event) {}

bool TabGroupHeader::OnMouseDragged(const ui::MouseEvent& event) {}

void TabGroupHeader::OnMouseReleased(const ui::MouseEvent& event) {}

void TabGroupHeader::OnMouseEntered(const ui::MouseEvent& event) {}

void TabGroupHeader::OnThemeChanged() {}

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

void TabGroupHeader::OnFocus() {}

void TabGroupHeader::GetAccessibleNodeData(ui::AXNodeData* node_data) {}

std::u16string TabGroupHeader::GetTooltipText(const gfx::Point& p) const {}

gfx::Rect TabGroupHeader::GetAnchorBoundsInScreen() const {}

TabSlotView::ViewType TabGroupHeader::GetTabSlotViewType() const {}

TabSizeInfo TabGroupHeader::GetTabSizeInfo() const {}

void TabGroupHeader::ShowContextMenuForViewImpl(
    views::View* source,
    const gfx::Point& point,
    ui::MenuSourceType source_type) {}

bool TabGroupHeader::DoesIntersectRect(const views::View* target,
                                       const gfx::Rect& rect) const {}

int TabGroupHeader::GetDesiredWidth() const {}

void TabGroupHeader::VisualsChanged() {}

int TabGroupHeader::GetCollapsedHeaderWidth() const {}

bool TabGroupHeader::ShouldShowSyncIcon() const {}

void TabGroupHeader::UpdateIsCollapsed() {}

void TabGroupHeader::RemoveObserverFromWidget(views::Widget* widget) {}

BEGIN_METADATA()

TabGroupHeader::EditorBubbleTracker::EditorBubbleTracker(
    TabSlotController& tab_slot_controller)
    :{}

TabGroupHeader::EditorBubbleTracker::~EditorBubbleTracker() {}

void TabGroupHeader::EditorBubbleTracker::Opened(views::Widget* bubble_widget) {}

void TabGroupHeader::EditorBubbleTracker::OnWidgetDestroying(
    views::Widget* bubble_widget) {}