OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef SpeechSynthesisEvent_h | 26 #ifndef SpeechSynthesisEvent_h |
27 #define SpeechSynthesisEvent_h | 27 #define SpeechSynthesisEvent_h |
28 | 28 |
29 #include "modules/EventModules.h" | 29 #include "modules/EventModules.h" |
30 #include "modules/speech/SpeechSynthesisUtterance.h" | 30 #include "modules/speech/SpeechSynthesisUtterance.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class SpeechSynthesisEvent final : public Event { | 34 class SpeechSynthesisEvent : public Event { |
35 DEFINE_WRAPPERTYPEINFO(); | 35 DEFINE_WRAPPERTYPEINFO(); |
36 public: | 36 public: |
37 static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(); | 37 static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(); |
38 static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(const AtomicStrin
g& type, SpeechSynthesisUtterance*, unsigned charIndex, float elapsedTime, const
String& name); | 38 static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(const AtomicStrin
g& type, SpeechSynthesisUtterance*, unsigned charIndex, float elapsedTime, const
String& name); |
39 | 39 |
40 SpeechSynthesisUtterance* utterance() const { return m_utterance; } | 40 SpeechSynthesisUtterance* utterance() const { return m_utterance; } |
41 unsigned charIndex() const { return m_charIndex; } | 41 unsigned charIndex() const { return m_charIndex; } |
42 float elapsedTime() const { return m_elapsedTime; } | 42 float elapsedTime() const { return m_elapsedTime; } |
43 const String& name() const { return m_name; } | 43 const String& name() const { return m_name; } |
44 | 44 |
45 virtual const AtomicString& interfaceName() const override { return EventNam
es::SpeechSynthesisEvent; } | 45 virtual const AtomicString& interfaceName() const override { return EventNam
es::SpeechSynthesisEvent; } |
46 | 46 |
47 DECLARE_VIRTUAL_TRACE(); | 47 DECLARE_VIRTUAL_TRACE(); |
48 | 48 |
49 private: | 49 private: |
50 SpeechSynthesisEvent(); | 50 SpeechSynthesisEvent(); |
51 SpeechSynthesisEvent(const AtomicString& type, SpeechSynthesisUtterance*, un
signed charIndex, float elapsedTime, const String& name); | 51 SpeechSynthesisEvent(const AtomicString& type, SpeechSynthesisUtterance*, un
signed charIndex, float elapsedTime, const String& name); |
52 | 52 |
53 PersistentWillBeMember<SpeechSynthesisUtterance> m_utterance; | 53 PersistentWillBeMember<SpeechSynthesisUtterance> m_utterance; |
54 unsigned m_charIndex; | 54 unsigned m_charIndex; |
55 float m_elapsedTime; | 55 float m_elapsedTime; |
56 String m_name; | 56 String m_name; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
60 | 60 |
61 #endif // SpeechSynthesisEvent_h | 61 #endif // SpeechSynthesisEvent_h |
OLD | NEW |