#include "components/translate/translate_internals/translate_internals_handler.h"
#include <map>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/types/cxx23_to_underlying.h"
#include "base/values.h"
#include "components/language/core/browser/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/translate/core/browser/translate_download_manager.h"
#include "components/translate/core/browser/translate_error_details.h"
#include "components/translate/core/browser/translate_event_details.h"
#include "components/translate/core/browser/translate_init_details.h"
#include "components/translate/core/browser/translate_pref_names.h"
#include "components/translate/core/browser/translate_prefs.h"
#include "components/translate/core/common/language_detection_details.h"
#include "components/variations/service/variations_service.h"
#include "ui/base/l10n/l10n_util.h"
namespace translate {
TranslateInternalsHandler::TranslateInternalsHandler() { … }
TranslateInternalsHandler::~TranslateInternalsHandler() = default;
base::Value::Dict TranslateInternalsHandler::GetLanguages() { … }
void TranslateInternalsHandler::RegisterMessageCallbacks() { … }
void TranslateInternalsHandler::AddLanguageDetectionDetails(
const translate::LanguageDetectionDetails& details) { … }
void TranslateInternalsHandler::OnTranslateError(
const translate::TranslateErrorDetails& details) { … }
void TranslateInternalsHandler::OnTranslateInit(
const translate::TranslateInitDetails& details) { … }
void TranslateInternalsHandler::OnTranslateEvent(
const translate::TranslateEventDetails& details) { … }
void TranslateInternalsHandler::OnRemovePrefItem(
const base::Value::List& args) { … }
void TranslateInternalsHandler::OnSetRecentTargetLanguage(
const base::Value::List& args) { … }
void TranslateInternalsHandler::OnOverrideCountry(
const base::Value::List& args) { … }
void TranslateInternalsHandler::OnRequestInfo(
const base::Value::List& ) { … }
void TranslateInternalsHandler::SendMessageToJs(
std::string_view message,
const base::Value::Dict& value) { … }
void TranslateInternalsHandler::SendPrefsToJs() { … }
void TranslateInternalsHandler::SendSupportedLanguagesToJs() { … }
void TranslateInternalsHandler::SendCountryToJs(bool was_updated) { … }
}