#include "chrome/browser/ui/views/commerce/price_tracking_icon_view.h"
#include "base/metrics/user_metrics.h"
#include "base/timer/timer.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/commerce/shopping_service_factory.h"
#include "chrome/browser/feature_engagement/tracker_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/commerce/commerce_ui_tab_helper.h"
#include "chrome/browser/ui/tabs/public/tab_features.h"
#include "chrome/browser/ui/tabs/public/tab_interface.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/page_action/page_action_icon_view.h"
#include "chrome/browser/ui/views/side_panel/side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/side_panel_entry.h"
#include "chrome/browser/ui/views/side_panel/side_panel_registry.h"
#include "chrome/common/pref_names.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/commerce/core/commerce_feature_list.h"
#include "components/commerce/core/metrics/metrics_utils.h"
#include "components/commerce/core/pref_names.h"
#include "components/commerce/core/price_tracking_utils.h"
#include "components/commerce/core/shopping_service.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/public/tracker.h"
#include "components/omnibox/browser/vector_icons.h"
#include "components/power_bookmarks/core/power_bookmark_utils.h"
#include "components/power_bookmarks/core/proto/power_bookmark_meta.pb.h"
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/vector_icon_types.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/view_class_properties.h"
namespace {
void AddIfNotBookmarkedToTheDefaultFolder(bookmarks::BookmarkModel* model,
content::WebContents* web_contents) { … }
}
PriceTrackingIconView::PriceTrackingIconView(
IconLabelBubbleView::Delegate* parent_delegate,
Delegate* delegate,
Browser* browser)
: … { … }
PriceTrackingIconView::~PriceTrackingIconView() = default;
views::BubbleDialogDelegate* PriceTrackingIconView::GetBubble() const { … }
void PriceTrackingIconView::OnExecuting(
PageActionIconView::ExecuteSource execute_source) { … }
const gfx::VectorIcon& PriceTrackingIconView::GetVectorIcon() const { … }
bool PriceTrackingIconView::ShouldShow() { … }
void PriceTrackingIconView::UpdateImpl() { … }
void PriceTrackingIconView::AnimationProgressed(
const gfx::Animation* animation) { … }
void PriceTrackingIconView::ForceVisibleForTesting(bool is_tracking_price) { … }
const std::u16string& PriceTrackingIconView::GetIconLabelForTesting() { … }
void PriceTrackingIconView::SetOneShotTimerForTesting(
base::OneShotTimer* timer) { … }
void PriceTrackingIconView::EnablePriceTracking(bool enable) { … }
void PriceTrackingIconView::SetVisualState(bool enable) { … }
void PriceTrackingIconView::OnPriceTrackingServerStateUpdated(bool success) { … }
bool PriceTrackingIconView::IsPriceTracking() const { … }
bool PriceTrackingIconView::ShouldShowFirstUseExperienceBubble() const { … }
void PriceTrackingIconView::MaybeShowPageActionLabel() { … }
void PriceTrackingIconView::HidePageActionLabel() { … }
base::OneShotTimer& PriceTrackingIconView::AnimateOutTimer() { … }
BEGIN_METADATA(…)