| Index: content/public/browser/tts_dispatcher_host.h
|
| diff --git a/content/public/browser/tts_dispatcher_host.h b/content/public/browser/tts_dispatcher_host.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..da209d7ab6b07ca9a8b539712518ba90377cd8d7
|
| --- /dev/null
|
| +++ b/content/public/browser/tts_dispatcher_host.h
|
| @@ -0,0 +1,58 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_
|
| +#define CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_
|
| +
|
| +#include "content/common/content_export.h"
|
| +#include "content/public/common/tts_utterance_request.h"
|
| +
|
| +namespace content {
|
| +
|
| +class BrowserContext;
|
| +class TtsDispatcherHost;
|
| +
|
| +class CONTENT_EXPORT TtsDispatcherHostDelegate {
|
| + public:
|
| + virtual void OnInitializeVoiceList(TtsDispatcherHost* dispatcher_host,
|
| + int routing_id) = 0;
|
| + virtual void OnSpeak(TtsDispatcherHost* dispatcher_host,
|
| + int routing_id,
|
| + const TtsUtteranceRequest& request) = 0;
|
| + virtual void OnPause(TtsDispatcherHost* dispatcher_host) = 0;
|
| + virtual void OnResume(TtsDispatcherHost* dispatcher_host) = 0;
|
| + virtual void OnCancel(TtsDispatcherHost* dispatcher_host) = 0;
|
| +};
|
| +
|
| +class CONTENT_EXPORT TtsDispatcherHost {
|
| + public:
|
| + TtsDispatcherHost() {}
|
| + virtual ~TtsDispatcherHost() {}
|
| +
|
| + virtual BrowserContext* GetBrowserContext() = 0;
|
| +
|
| + virtual void DidStartSpeaking(int routing_id, int utterance_id) = 0;
|
| + virtual void DidFinishSpeaking(int routing_id, int utterance_id) = 0;
|
| + virtual void DidPauseSpeaking(int routing_id, int utterance_id) = 0;
|
| + virtual void DidResumeSpeaking(int routing_id, int utterance_id) = 0;
|
| + virtual void WordBoundary(int routing_id, int utterance_id, int char_index)
|
| + = 0;
|
| + virtual void SentenceBoundary(
|
| + int routing_id, int utterance_id, int char_index) = 0;
|
| + virtual void MarkerEvent(int routing_id, int utterance_id, int char_index)
|
| + = 0;
|
| + virtual void WasInterrupted(int routing_id, int utterance_id) = 0;
|
| + virtual void WasCancelled(int routing_id, int utterance_id) = 0;
|
| + virtual void SpeakingErrorOccurred(
|
| + int routing_id, int utterance_id, const std::string& error_message)
|
| + = 0;
|
| + virtual void SendVoiceList(int routing_id,
|
| + const std::vector<content::TtsVoice>&) = 0;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TtsDispatcherHost);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_
|
|
|