chromium/chrome/browser/speech/extension_api/tts_extension_api.h

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

#ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_H_
#define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_H_

#include <string>

#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "content/public/browser/tts_controller.h"
#include "extensions/browser/api/api_resource_manager.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/extension_function.h"

namespace content {
class BrowserContext;
}

const char* TtsEventTypeToString(content::TtsEventType event_type);
content::TtsEventType TtsEventTypeFromString(const std::string& str);

namespace extensions {

class TtsSpeakFunction : public ExtensionFunction {};

class TtsStopSpeakingFunction : public ExtensionFunction {};

class TtsPauseFunction : public ExtensionFunction {};

class TtsResumeFunction : public ExtensionFunction {};

class TtsIsSpeakingFunction : public ExtensionFunction {};

class TtsGetVoicesFunction : public ExtensionFunction {};

class TtsAPI : public BrowserContextKeyedAPI,
               public EventRouter::Observer,
               public content::VoicesChangedDelegate {};

template <>
struct BrowserContextFactoryDependencies<TtsAPI> {};

}  // namespace extensions

#endif  // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_H_