Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1711)

Unified Diff: Source/modules/speech/SpeechSynthesisEvent.cpp

Issue 1007803002: Add SpeechSynthesisUtterance attribute on SpeechSynthesisEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix error on layout-test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/speech/SpeechSynthesisEvent.h ('k') | Source/modules/speech/SpeechSynthesisEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/speech/SpeechSynthesisEvent.cpp
diff --git a/Source/modules/speech/SpeechSynthesisEvent.cpp b/Source/modules/speech/SpeechSynthesisEvent.cpp
index 05ee1d1bdc8e91e4fe59fb293cdb541df92c48f0..651932f1293d10d76815d590a4f1073af74def88 100644
--- a/Source/modules/speech/SpeechSynthesisEvent.cpp
+++ b/Source/modules/speech/SpeechSynthesisEvent.cpp
@@ -33,21 +33,28 @@ PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create()
return adoptRefWillBeNoop(new SpeechSynthesisEvent);
}
-PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name)
+PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create(const AtomicString& type, SpeechSynthesisUtterance* utterance, unsigned charIndex, float elapsedTime, const String& name)
{
- return adoptRefWillBeNoop(new SpeechSynthesisEvent(type, charIndex, elapsedTime, name));
+ return adoptRefWillBeNoop(new SpeechSynthesisEvent(type, utterance, charIndex, elapsedTime, name));
}
SpeechSynthesisEvent::SpeechSynthesisEvent()
{
}
-SpeechSynthesisEvent::SpeechSynthesisEvent(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name)
+SpeechSynthesisEvent::SpeechSynthesisEvent(const AtomicString& type, SpeechSynthesisUtterance* utterance, unsigned charIndex, float elapsedTime, const String& name)
: Event(type, false, false)
+ , m_utterance(utterance)
, m_charIndex(charIndex)
, m_elapsedTime(elapsedTime)
, m_name(name)
{
}
+DEFINE_TRACE(SpeechSynthesisEvent)
+{
+ visitor->trace(m_utterance);
+ Event::trace(visitor);
+}
+
} // namespace blink
« no previous file with comments | « Source/modules/speech/SpeechSynthesisEvent.h ('k') | Source/modules/speech/SpeechSynthesisEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698