| 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..c23203a6c15cd4e0842aea79fbb8583bb16992eb
|
| --- /dev/null
|
| +++ b/content/public/browser/tts_dispatcher_host.h
|
| @@ -0,0 +1,51 @@
|
| +// 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) = 0;
|
| + virtual void OnSpeak(TtsDispatcherHost* dispatcher_host,
|
| + 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 utterance_id) = 0;
|
| + virtual void DidFinishSpeaking(int utterance_id) = 0;
|
| + virtual void DidPauseSpeaking(int utterance_id) = 0;
|
| + virtual void DidResumeSpeaking(int utterance_id) = 0;
|
| + virtual void WordBoundary(int utterance_id, int char_index) = 0;
|
| + virtual void SentenceBoundary(int utterance_id, int char_index) = 0;
|
| + virtual void MarkerEvent(int utterance_id, int char_index) = 0;
|
| + virtual void WasInterrupted(int utterance_id) = 0;
|
| + virtual void WasCancelled(int utterance_id) = 0;
|
| + virtual void SpeakingErrorOccurred(
|
| + int utterance_id, const std::string& error_message) = 0;
|
| + virtual void SendVoiceList(const std::vector<content::TtsVoice>&) = 0;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TtsDispatcherHost);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_
|
|
|