chromium/chrome/browser/translate/fake_translate_agent.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/translate/fake_translate_agent.h"

#include <stddef.h>

#include <memory>
#include <set>
#include <tuple>
#include <utility>
#include <vector>

#include "build/build_config.h"
#include "chrome/browser/translate/chrome_translate_client.h"
#include "chrome/browser/translate/translate_service.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "components/infobars/content/content_infobar_manager.h"
#include "components/infobars/core/infobar.h"
#include "components/infobars/core/infobar_manager.h"
#include "components/translate/content/browser/content_translate_driver.h"
#include "components/translate/content/common/translate.mojom.h"
#include "components/translate/core/browser/translate_infobar_delegate.h"
#include "components/translate/core/browser/translate_manager.h"
#include "components/translate/core/browser/translate_ui_delegate.h"
#include "components/translate/core/common/language_detection_details.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "url/gurl.h"

FakeTranslateAgent::FakeTranslateAgent()
    :{}

FakeTranslateAgent::~FakeTranslateAgent() = default;

// TODO(crbug.com/40123934) Remove with subframe translation launch.
mojo::PendingRemote<translate::mojom::TranslateAgent>
FakeTranslateAgent::BindToNewPageRemote() {}

// translate::mojom::TranslateAgent implementation.
void FakeTranslateAgent::TranslateFrame(const std::string& translate_script,
                                        const std::string& source_lang,
                                        const std::string& target_lang,
                                        TranslateFrameCallback callback) {}

void FakeTranslateAgent::RevertTranslation() {}

void FakeTranslateAgent::PageTranslated(bool cancelled,
                                        const std::string& source_lang,
                                        const std::string& target_lang,
                                        translate::TranslateErrors error) {}