#include "chrome/browser/ui/views/commerce/price_tracking_view.h"
#include "base/metrics/user_metrics.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/commerce/shopping_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/commerce/core/commerce_feature_list.h"
#include "components/commerce/core/price_tracking_utils.h"
#include "components/omnibox/browser/vector_icons.h"
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/insets_outsets_base.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/toggle_button.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/box_layout_view.h"
#include "ui/views/layout/flex_layout_view.h"
#include "ui/views/layout/layout_provider.h"
namespace {
constexpr int kIconSize = …;
constexpr int kIconMargin = …;
int GetIconMargin() { … }
gfx::Size GetIconSize() { … }
}
PriceTrackingView::PriceTrackingView(Profile* profile,
const GURL& page_url,
bool is_price_track_enabled,
const commerce::ProductInfo& product_info)
: … { … }
PriceTrackingView::~PriceTrackingView() = default;
bool PriceTrackingView::IsToggleOn() { … }
void PriceTrackingView::OnSubscribe(const commerce::CommerceSubscription& sub,
bool succeeded) { … }
void PriceTrackingView::OnUnsubscribe(const commerce::CommerceSubscription& sub,
bool succeeded) { … }
void PriceTrackingView::HandleSubscriptionUpdate(
const commerce::CommerceSubscription& sub,
bool is_tracking) { … }
std::u16string PriceTrackingView::GetToggleAccessibleName() { … }
void PriceTrackingView::OnToggleButtonPressed(const GURL& url) { … }
void PriceTrackingView::UpdatePriceTrackingState(const GURL& url) { … }
void PriceTrackingView::OnPriceTrackingStateUpdated(bool success) { … }
BEGIN_METADATA(…)