summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h')
-rw-r--r--chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h b/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
index b8a29b4136b..83f91cfbc2a 100644
--- a/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
+++ b/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
@@ -36,23 +36,29 @@
#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h"
+#include "third_party/blink/renderer/platform/supplementable.h"
namespace blink {
+class LocalDOMWindow;
+
class MODULES_EXPORT SpeechSynthesis final
: public EventTargetWithInlineData,
public ExecutionContextClient,
+ public Supplement<LocalDOMWindow>,
public mojom::blink::SpeechSynthesisVoiceListObserver {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(SpeechSynthesis);
public:
- static SpeechSynthesis* Create(ExecutionContext*);
- static SpeechSynthesis* CreateForTesting(
- ExecutionContext*,
+ static const char kSupplementName[];
+
+ static SpeechSynthesis* speechSynthesis(LocalDOMWindow&);
+ static void CreateForTesting(
+ LocalDOMWindow&,
mojo::PendingRemote<mojom::blink::SpeechSynthesis>);
- explicit SpeechSynthesis(ExecutionContext*);
+ explicit SpeechSynthesis(LocalDOMWindow&);
bool pending() const;
bool speaking() const;
@@ -72,7 +78,7 @@ class MODULES_EXPORT SpeechSynthesis final
}
// GarbageCollected
- void Trace(Visitor*) override;
+ void Trace(Visitor*) const override;
// mojom::blink::SpeechSynthesisVoiceListObserver
void OnSetVoiceList(
@@ -125,10 +131,10 @@ class MODULES_EXPORT SpeechSynthesis final
HeapMojoReceiver<mojom::blink::SpeechSynthesisVoiceListObserver,
SpeechSynthesis,
- HeapMojoWrapperMode::kWithoutContextObserver>
+ HeapMojoWrapperMode::kForceWithoutContextObserver>
receiver_;
HeapMojoRemote<mojom::blink::SpeechSynthesis,
- HeapMojoWrapperMode::kWithoutContextObserver>
+ HeapMojoWrapperMode::kForceWithoutContextObserver>
mojom_synthesis_;
HeapVector<Member<SpeechSynthesisVoice>> voice_list_;
HeapDeque<Member<SpeechSynthesisUtterance>> utterance_queue_;