#include "chrome/browser/on_device_translation/translation_manager_impl.h"
#include "chrome/browser/on_device_translation/service_controller.h"
#include "chrome/browser/on_device_translation/translator.h"
#include "content/public/browser/render_frame_host.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "third_party/blink/public/mojom/on_device_translation/translation_manager.mojom.h"
DOCUMENT_USER_DATA_KEY_IMPL(TranslationManagerImpl);
TranslationManagerImpl::TranslationManagerImpl(content::RenderFrameHost* rfh)
: … { … }
TranslationManagerImpl::~TranslationManagerImpl() = default;
void TranslationManagerImpl::Create(
content::RenderFrameHost* render_frame_host,
mojo::PendingReceiver<blink::mojom::TranslationManager> receiver) { … }
void TranslationManagerImpl::CanCreateTranslator(
const std::string& source_lang,
const std::string& target_lang,
CanCreateTranslatorCallback callback) { … }
void TranslationManagerImpl::CreateTranslator(
const std::string& source_lang,
const std::string& target_lang,
mojo::PendingReceiver<blink::mojom::Translator> receiver,
CreateTranslatorCallback callback) { … }