chromium/content/browser/speech/speech_recognition_session.cc

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

#include "content/browser/speech/speech_recognition_session.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/speech/speech_recognition_manager_impl.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"

namespace content {

SpeechRecognitionSession::SpeechRecognitionSession(
    mojo::PendingRemote<media::mojom::SpeechRecognitionSessionClient> client)
    :{}

SpeechRecognitionSession::~SpeechRecognitionSession() {}

base::WeakPtr<SpeechRecognitionSession> SpeechRecognitionSession::AsWeakPtr() {}

void SpeechRecognitionSession::Abort() {}

void SpeechRecognitionSession::StopCapture() {}

// -------- SpeechRecognitionEventListener interface implementation -----------

void SpeechRecognitionSession::OnRecognitionStart(int session_id) {}

void SpeechRecognitionSession::OnAudioStart(int session_id) {}

void SpeechRecognitionSession::OnSoundStart(int session_id) {}

void SpeechRecognitionSession::OnSoundEnd(int session_id) {}

void SpeechRecognitionSession::OnAudioEnd(int session_id) {}

void SpeechRecognitionSession::OnRecognitionEnd(int session_id) {}

void SpeechRecognitionSession::OnRecognitionResults(
    int session_id,
    const std::vector<media::mojom::WebSpeechRecognitionResultPtr>& results) {}

void SpeechRecognitionSession::OnRecognitionError(
    int session_id,
    const media::mojom::SpeechRecognitionError& error) {}

// The events below are currently not used by speech JS APIs implementation.
void SpeechRecognitionSession::OnAudioLevelsChange(int session_id,
                                                   float volume,
                                                   float noise_volume) {}

void SpeechRecognitionSession::ConnectionErrorHandler() {}

}  // namespace content