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

// Copyright 2017 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_icon.h"

#include "base/i18n/rtl.h"
#include "base/memory/raw_ptr.h"
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
#include "base/timer/elapsed_timer.h"
#include "base/trace_event/trace_event.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/favicon/favicon_utils.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/tab_renderer_data.h"
#include "chrome/browser/ui/views/dotted_icon.h"
#include "chrome/common/webui_url_constants.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/grit/components_scaled_resources.h"
#include "content/public/common/url_constants.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/animation/linear_animation.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/scoped_canvas.h"
#include "ui/native_theme/native_theme.h"
#include "ui/resources/grit/ui_resources.h"
#include "ui/views/border.h"
#include "ui/views/cascading_property.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/widget/widget.h"
#include "url/gurl.h"

namespace {

constexpr int kAttentionIndicatorRadius =;
constexpr int kLoadingAnimationStrokeWidthDp =;

bool NetworkStateIsAnimated(TabNetworkState network_state) {}

}  // namespace

DEFINE_CUSTOM_ELEMENT_EVENT_TYPE(kDiscardAnimationFinishes);

// Helper class that manages the favicon crash animation.
class TabIcon::CrashAnimation : public gfx::LinearAnimation,
                                public gfx::AnimationDelegate {};

TabIcon::TabIcon()
    :{}

TabIcon::~TabIcon() = default;

void TabIcon::SetData(const TabRendererData& data) {}

void TabIcon::SetActiveState(bool is_active) {}

void TabIcon::SetAttention(AttentionType type, bool enabled) {}

bool TabIcon::GetShowingLoadingAnimation() const {}

bool TabIcon::GetShowingAttentionIndicator() const {}

bool TabIcon::GetShowingDiscardIndicator() const {}

void TabIcon::SetCanPaintToLayer(bool can_paint_to_layer) {}

void TabIcon::StepLoadingAnimation(const base::TimeDelta& elapsed_time) {}

void TabIcon::EnlargeDiscardIndicatorRadius(int radius) {}

void TabIcon::SetShouldShowDiscardIndicator(bool enabled) {}

void TabIcon::OnPaint(gfx::Canvas* canvas) {}

void TabIcon::OnThemeChanged() {}

void TabIcon::AnimationProgressed(const gfx::Animation* animation) {}

void TabIcon::AnimationEnded(const gfx::Animation* animation) {}

void TabIcon::PaintAttentionIndicatorAndIcon(gfx::Canvas* canvas,
                                             const gfx::ImageSkia& icon,
                                             const gfx::Rect& bounds) {}

void TabIcon::PaintDiscardRingAndIcon(gfx::Canvas* canvas,
                                      const gfx::ImageSkia& icon,
                                      const gfx::Rect& icon_bounds) {}

void TabIcon::PaintLoadingAnimation(gfx::Canvas* canvas, gfx::Rect bounds) {}

gfx::ImageSkia TabIcon::GetIconToPaint() {}

void TabIcon::MaybePaintFavicon(gfx::Canvas* canvas,
                                const gfx::ImageSkia& icon,
                                const gfx::Rect& bounds) {}

bool TabIcon::GetNonDefaultFavicon() const {}

void TabIcon::SetIcon(const ui::ImageModel& icon, bool should_themify_favicon) {}

void TabIcon::SetDiscarded(bool discarded) {}

void TabIcon::SetNetworkState(TabNetworkState network_state) {}

void TabIcon::SetCrashed(bool crashed) {}

bool TabIcon::GetCrashed() const {}

void TabIcon::RefreshLayer() {}

gfx::ImageSkia TabIcon::ThemeFavicon(const gfx::ImageSkia& source) {}

gfx::ImageSkia TabIcon::ThemeMonochromeFavicon(const gfx::ImageSkia& source) {}

void TabIcon::UpdateThemedFavicon() {}

BEGIN_METADATA()