#include "components/user_education/common/tutorial_service.h"
#include <memory>
#include <vector>
#include "base/auto_reset.h"
#include "base/callback_list.h"
#include "base/functional/bind.h"
#include "base/time/time.h"
#include "components/user_education/common/help_bubble.h"
#include "components/user_education/common/help_bubble_factory_registry.h"
#include "components/user_education/common/tutorial.h"
#include "components/user_education/common/tutorial_identifier.h"
#include "components/user_education/common/tutorial_registry.h"
namespace user_education {
namespace {
constexpr base::TimeDelta kBrokenTutorialTimeout = …;
constexpr base::TimeDelta kTutorialNotStartedTimeout = …;
}
TutorialService::TutorialCreationParams::TutorialCreationParams(
const TutorialDescription* description,
ui::ElementContext context)
: … { … }
TutorialService::TutorialService(
TutorialRegistry* tutorial_registry,
HelpBubbleFactoryRegistry* help_bubble_factory_registry)
: … { … }
TutorialService::~TutorialService() = default;
void TutorialService::StartTutorial(TutorialIdentifier id,
ui::ElementContext context,
CompletedCallback completed_callback,
AbortedCallback aborted_callback,
RestartedCallback restarted_callback) { … }
bool TutorialService::CancelTutorialIfRunning(
std::optional<TutorialIdentifier> id) { … }
void TutorialService::LogIPHLinkClicked(TutorialIdentifier id,
bool iph_link_was_clicked) { … }
void TutorialService::LogStartedFromWhatsNewPage(TutorialIdentifier id,
bool success) { … }
bool TutorialService::RestartTutorial() { … }
void TutorialService::AbortTutorial(std::optional<int> abort_step) { … }
void TutorialService::OnNonFinalBubbleClosed(HelpBubble* bubble,
HelpBubble::CloseReason) { … }
void TutorialService::CompleteTutorial() { … }
void TutorialService::SetCurrentBubble(std::unique_ptr<HelpBubble> bubble,
bool is_last_step) { … }
void TutorialService::HideCurrentBubbleIfShowing() { … }
bool TutorialService::IsRunningTutorial(
std::optional<TutorialIdentifier> id) const { … }
void TutorialService::ResetRunningTutorial() { … }
void TutorialService::OnBrokenTutorial() { … }
}