#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
#include <string>
#include "base/feature_list.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/headless/headless_mode_util.h"
#include "chrome/browser/privacy_sandbox/privacy_sandbox_service.h"
#include "chrome/browser/privacy_sandbox/privacy_sandbox_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service_factory.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/toolbar/toolbar_controller.h"
#include "chrome/browser/ui/views/user_education/browser_user_education_service.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/event_constants.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/search_engines/search_engine_choice/search_engine_choice_utils.h"
#include "ui/base/interaction/element_tracker.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/accessible_pane_view.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/view.h"
#include "ui/views/view_utils.h"
BrowserFeaturePromoController::BrowserFeaturePromoController(
BrowserView* browser_view,
feature_engagement::Tracker* feature_engagement_tracker,
user_education::FeaturePromoRegistry* registry,
user_education::HelpBubbleFactoryRegistry* help_bubble_registry,
user_education::FeaturePromoStorageService* storage_service,
user_education::FeaturePromoSessionPolicy* session_policy,
user_education::TutorialService* tutorial_service,
user_education::ProductMessagingController* messaging_controller)
: … { … }
BrowserFeaturePromoController::~BrowserFeaturePromoController() = default;
BrowserFeaturePromoController* BrowserFeaturePromoController::GetForView(
views::View* view) { … }
ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { … }
bool BrowserFeaturePromoController::CanShowPromoForElement(
ui::TrackedElement* anchor_element) const { … }
const ui::AcceleratorProvider*
BrowserFeaturePromoController::GetAcceleratorProvider() const { … }
std::u16string BrowserFeaturePromoController::GetTutorialScreenReaderHint()
const { … }
std::u16string
BrowserFeaturePromoController::GetFocusHelpBubbleScreenReaderHint(
user_education::FeaturePromoSpecification::PromoType promo_type,
ui::TrackedElement* anchor_element,
bool is_critical_promo) const { … }
std::u16string GetFocusHelpBubbleScreenReaderHintCommon(
user_education::FeaturePromoSpecification::PromoType promo_type,
const ui::AcceleratorProvider* accelerator_provider,
ui::TrackedElement* anchor_element,
bool is_critical_promo) { … }
std::u16string BrowserFeaturePromoController::GetBodyIconAltText() const { … }
const base::Feature*
BrowserFeaturePromoController::GetScreenReaderPromptPromoFeature() const { … }
const char* BrowserFeaturePromoController::GetScreenReaderPromptPromoEventName()
const { … }