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 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef SpeechSynthesisVoice_h | 26 #ifndef SpeechSynthesisVoice_h |
27 #define SpeechSynthesisVoice_h | 27 #define SpeechSynthesisVoice_h |
28 | 28 |
29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
31 #include "platform/speech/PlatformSpeechSynthesisVoice.h" | 31 #include "platform/speech/PlatformSpeechSynthesisVoice.h" |
32 #include "wtf/PassRefPtr.h" | |
33 #include "wtf/RefCounted.h" | |
34 #include "wtf/text/WTFString.h" | 32 #include "wtf/text/WTFString.h" |
35 | 33 |
36 namespace WebCore { | 34 namespace WebCore { |
37 | 35 |
38 class SpeechSynthesisVoice FINAL : public GarbageCollectedFinalized<SpeechSynthe
sisVoice>, public ScriptWrappable { | 36 class SpeechSynthesisVoice FINAL : public GarbageCollectedFinalized<SpeechSynthe
sisVoice>, public ScriptWrappable { |
39 public: | 37 public: |
40 static SpeechSynthesisVoice* create(PassRefPtr<PlatformSpeechSynthesisVoice>
); | 38 static SpeechSynthesisVoice* create(PlatformSpeechSynthesisVoice*); |
41 | 39 |
42 const String& voiceURI() const { return m_platformVoice->voiceURI(); } | 40 const String& voiceURI() const { return m_platformVoice->voiceURI(); } |
43 const String& name() const { return m_platformVoice->name(); } | 41 const String& name() const { return m_platformVoice->name(); } |
44 const String& lang() const { return m_platformVoice->lang(); } | 42 const String& lang() const { return m_platformVoice->lang(); } |
45 bool localService() const { return m_platformVoice->localService(); } | 43 bool localService() const { return m_platformVoice->localService(); } |
46 bool isDefault() const { return m_platformVoice->isDefault(); } | 44 bool isDefault() const { return m_platformVoice->isDefault(); } |
47 | 45 |
48 PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice
.get(); } | 46 PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice
; } |
49 | 47 |
50 void trace(Visitor*) { } | 48 void trace(Visitor*); |
51 | 49 |
52 private: | 50 private: |
53 explicit SpeechSynthesisVoice(PassRefPtr<PlatformSpeechSynthesisVoice>); | 51 explicit SpeechSynthesisVoice(PlatformSpeechSynthesisVoice*); |
54 | 52 |
55 RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice; | 53 Member<PlatformSpeechSynthesisVoice> m_platformVoice; |
56 }; | 54 }; |
57 | 55 |
58 } // namespace WebCore | 56 } // namespace WebCore |
59 | 57 |
60 #endif // SpeechSynthesisVoice_h | 58 #endif // SpeechSynthesisVoice_h |
OLD | NEW |