#include "chrome/browser/ui/views/infobars/infobar_view.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/infobar_delegate.h"
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/class_property.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/theme_provider.h"
#include "ui/base/ui_base_features.h"
#include "ui/base/window_open_disposition_utils.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/native_theme/common_theme.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/background.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/button/menu_button.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/controls/link.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_utils.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/non_client_view.h"
namespace {
int GetElementSpacing() { … }
gfx::Insets GetCloseButtonSpacing() { … }
}
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(InfoBarView, kInfoBarElementId);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(InfoBarView, kDismissButtonElementId);
InfoBarView::InfoBarView(std::unique_ptr<infobars::InfoBarDelegate> delegate)
: … { … }
InfoBarView::~InfoBarView() { … }
void InfoBarView::Layout(PassKey) { … }
void InfoBarView::GetAccessibleNodeData(ui::AXNodeData* node_data) { … }
gfx::Size InfoBarView::CalculatePreferredSize(
const views::SizeBounds& available_size) const { … }
void InfoBarView::ViewHierarchyChanged(
const views::ViewHierarchyChangedDetails& details) { … }
void InfoBarView::OnThemeChanged() { … }
void InfoBarView::OnWillChangeFocus(View* focused_before, View* focused_now) { … }
std::unique_ptr<views::Label> InfoBarView::CreateLabel(
const std::u16string& text) const { … }
std::unique_ptr<views::Link> InfoBarView::CreateLink(
const std::u16string& text) { … }
void InfoBarView::AssignWidths(Views* views, int available_width) { … }
int InfoBarView::GetContentMinimumWidth() const { … }
int InfoBarView::GetStartX() const { … }
int InfoBarView::GetEndX() const { … }
int InfoBarView::OffsetY(views::View* view) const { … }
void InfoBarView::PlatformSpecificShow(bool animate) { … }
void InfoBarView::PlatformSpecificHide(bool animate) { … }
void InfoBarView::PlatformSpecificOnHeightRecalculated() { … }
void InfoBarView::AssignWidthsSorted(Views* views, int available_width) { … }
void InfoBarView::SetLabelDetails(views::Label* label) const { … }
void InfoBarView::LinkClicked(const ui::Event& event) { … }
void InfoBarView::CloseButtonPressed() { … }
BEGIN_METADATA(…)