#include "components/live_caption/views/caption_bubble_model.h"
#include "base/feature_list.h"
#include "base/functional/callback_forward.h"
#include "base/metrics/histogram_functions.h"
#include "components/live_caption/caption_bubble_context.h"
#include "components/live_caption/views/caption_bubble.h"
#include "media/base/media_switches.h"
namespace {
constexpr int kMaxLines = …;
int GetLongestCommonPrefixLength(const std::string& str1,
const std::string& str2) { … }
}
namespace captions {
CaptionBubbleModel::CaptionBubbleModel(CaptionBubbleContext* context,
OnCaptionBubbleClosedCallback callback)
: … { … }
CaptionBubbleModel::~CaptionBubbleModel() { … }
void CaptionBubbleModel::SetObserver(CaptionBubble* observer) { … }
void CaptionBubbleModel::RemoveObserver() { … }
void CaptionBubbleModel::OnTextChanged() { … }
void CaptionBubbleModel::OnAutoDetectedLanguageChanged() { … }
void CaptionBubbleModel::SetPartialText(const std::string& partial_text) { … }
void CaptionBubbleModel::SetDownloadProgressText(
const std::u16string& download_progress_text) { … }
void CaptionBubbleModel::OnLanguagePackInstalled() { … }
void CaptionBubbleModel::CloseButtonPressed() { … }
void CaptionBubbleModel::Close() { … }
void CaptionBubbleModel::OnError(
CaptionBubbleErrorType error_type,
OnErrorClickedCallback error_clicked_callback,
OnDoNotShowAgainClickedCallback error_silenced_callback) { … }
void CaptionBubbleModel::ClearText() { … }
void CaptionBubbleModel::CommitPartialText() { … }
void CaptionBubbleModel::SetLanguage(const std::string& language_code) { … }
CaptionBubbleModel::Id CaptionBubbleModel::GetNextId() { … }
}