mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1211974 - Implement nsIObserver in SpeechDispatcherService. r=smaug
This commit is contained in:
parent
f3dd15b3d3
commit
f7492b24ab
@ -277,7 +277,8 @@ speechd_cb(size_t msg_id, size_t client_id, SPDNotificationType state)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(SpeechDispatcherService)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISpeechService)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISpeechService)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIObserver)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF(SpeechDispatcherService)
|
||||
@ -449,6 +450,17 @@ SpeechDispatcherService::RegisterVoices()
|
||||
mInitialized = true;
|
||||
}
|
||||
|
||||
// nsIObserver
|
||||
|
||||
NS_IMETHODIMP
|
||||
SpeechDispatcherService::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsISpeechService
|
||||
|
||||
// TODO: Support SSML
|
||||
NS_IMETHODIMP
|
||||
SpeechDispatcherService::Speak(const nsAString& aText, const nsAString& aUri,
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsISpeechService.h"
|
||||
#include "nsIThread.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
@ -22,11 +23,13 @@ namespace dom {
|
||||
class SpeechDispatcherCallback;
|
||||
class SpeechDispatcherVoice;
|
||||
|
||||
class SpeechDispatcherService final : public nsISpeechService
|
||||
class SpeechDispatcherService final : public nsIObserver,
|
||||
public nsISpeechService
|
||||
{
|
||||
friend class SpeechDispatcherCallback;
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
NS_DECL_NSISPEECHSERVICE
|
||||
|
||||
SpeechDispatcherService();
|
||||
|
Loading…
Reference in New Issue
Block a user