#include "content/browser/ai/echo_ai_manager_impl.h"
#include "base/no_destructor.h"
#include "base/supports_user_data.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "content/browser/ai/echo_ai_rewriter.h"
#include "content/browser/ai/echo_ai_summarizer.h"
#include "content/browser/ai/echo_ai_text_session.h"
#include "content/browser/ai/echo_ai_writer.h"
#include "content/public/browser/browser_context.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "third_party/blink/public/mojom/ai/ai_text_session_info.mojom.h"
namespace content {
EchoAIManagerImpl::EchoAIManagerImpl(content::BrowserContext* browser_context,
ReceiverContext context) { … }
EchoAIManagerImpl::~EchoAIManagerImpl() = default;
void EchoAIManagerImpl::Create(
content::BrowserContext* browser_context,
ReceiverContext context,
mojo::PendingReceiver<blink::mojom::AIManager> receiver) { … }
void EchoAIManagerImpl::CanCreateTextSession(
CanCreateTextSessionCallback callback) { … }
void EchoAIManagerImpl::CreateTextSession(
mojo::PendingReceiver<blink::mojom::AITextSession> receiver,
blink::mojom::AITextSessionSamplingParamsPtr sampling_params,
const std::optional<std::string>& system_prompt,
CreateTextSessionCallback callback) { … }
void EchoAIManagerImpl::CanCreateSummarizer(
CanCreateSummarizerCallback callback) { … }
void EchoAIManagerImpl::CreateSummarizer(
mojo::PendingRemote<blink::mojom::AIManagerCreateSummarizerClient> client,
blink::mojom::AISummarizerOptionsPtr options,
const std::optional<std::string>& shared_context) { … }
void EchoAIManagerImpl::GetTextModelInfo(GetTextModelInfoCallback callback) { … }
void EchoAIManagerImpl::CreateWriter(
const std::optional<std::string>& shared_context,
mojo::PendingRemote<blink::mojom::AIManagerCreateWriterClient> client) { … }
void EchoAIManagerImpl::CreateRewriter(
const std::optional<std::string>& shared_context,
blink::mojom::AIRewriterTone tone,
blink::mojom::AIRewriterLength length,
mojo::PendingRemote<blink::mojom::AIManagerCreateRewriterClient> client) { … }
}