#include "chrome/browser/ui/views/permissions/chip/permission_chip_view.h"
#include <memory>
#include "base/numerics/safe_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/location_bar/location_bar_util.h"
#include "chrome/browser/ui/views/permissions/chip/multi_image_container.h"
#include "chrome/browser/ui/views/permissions/chip/permission_chip_theme.h"
#include "chrome/browser/ui/views/permissions/permission_prompt_style.h"
#include "components/permissions/permission_uma_util.h"
#include "components/vector_icons/vector_icons.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/theme_provider.h"
#include "ui/base/ui_base_features.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/background.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/painter.h"
#include "ui/views/view_class_properties.h"
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(PermissionChipView, kElementIdForTesting);
PermissionChipView::PermissionChipView(PressedCallback callback)
: … { … }
PermissionChipView::~PermissionChipView() = default;
void PermissionChipView::VisibilityChanged(views::View* starting_from,
bool is_visible) { … }
void PermissionChipView::AnimateCollapse(base::TimeDelta duration) { … }
void PermissionChipView::AnimateExpand(base::TimeDelta duration) { … }
void PermissionChipView::AnimateToFit(base::TimeDelta duration) { … }
void PermissionChipView::ResetAnimation(double value) { … }
gfx::Size PermissionChipView::CalculatePreferredSize(
const views::SizeBounds& available_size) const { … }
bool PermissionChipView::OnMousePressed(const ui::MouseEvent& event) { … }
void PermissionChipView::OnThemeChanged() { … }
void PermissionChipView::UpdateBackgroundColor() { … }
void PermissionChipView::AnimationEnded(const gfx::Animation* animation) { … }
void PermissionChipView::AnimationProgressed(const gfx::Animation* animation) { … }
void PermissionChipView::SetUserDecision(
permissions::PermissionAction user_decision) { … }
void PermissionChipView::SetTheme(PermissionChipTheme theme) { … }
void PermissionChipView::SetBlockedIconShowing(bool should_show_blocked_icon) { … }
void PermissionChipView::SetPermissionPromptStyle(
PermissionPromptStyle prompt_style) { … }
void PermissionChipView::SetMessage(std::u16string message) { … }
MultiImageContainer* PermissionChipView::multi_image_container() { … }
ui::ImageModel PermissionChipView::GetIconImageModel() const { … }
const gfx::VectorIcon& PermissionChipView::GetIcon() const { … }
SkColor PermissionChipView::GetForegroundColor() const { … }
SkColor PermissionChipView::GetBackgroundColor() const { … }
void PermissionChipView::UpdateIconAndColors() { … }
void PermissionChipView::ForceAnimateExpand() { … }
void PermissionChipView::ForceAnimateCollapse() { … }
void PermissionChipView::OnAnimationValueMaybeChanged() { … }
int PermissionChipView::GetIconSize() const { … }
int PermissionChipView::GetCornerRadius() const { … }
gfx::RoundedCornersF PermissionChipView::GetCornerRadii() const { … }
gfx::Insets PermissionChipView::GetPadding() const { … }
void PermissionChipView::SetChipIcon(const gfx::VectorIcon& icon) { … }
void PermissionChipView::SetChipIcon(const gfx::VectorIcon* icon) { … }
bool PermissionChipView::GetIsRequestForTesting() const { … }
void PermissionChipView::AddObserver(Observer* observer) { … }
void PermissionChipView::RemoveObserver(Observer* observer) { … }
void PermissionChipView::UpdateForDividerVisibility(bool is_divider_visible,
int divider_arc_width) { … }
int PermissionChipView::GetIconViewWidth() const { … }
BEGIN_METADATA(…)