OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Computer, 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef PlatformSpeechSynthesizer_h | 26 #ifndef PlatformSpeechSynthesizer_h |
27 #define PlatformSpeechSynthesizer_h | 27 #define PlatformSpeechSynthesizer_h |
28 | 28 |
29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.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/Vector.h" | 32 #include "wtf/Vector.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 class WebSpeechSynthesizer; | |
36 class WebSpeechSynthesizerClient; | |
37 } | |
38 | |
39 namespace blink { | |
40 | 35 |
41 enum SpeechBoundary { | 36 enum SpeechBoundary { |
42 SpeechWordBoundary, | 37 SpeechWordBoundary, |
43 SpeechSentenceBoundary | 38 SpeechSentenceBoundary |
44 }; | 39 }; |
45 | 40 |
46 class PlatformSpeechSynthesisUtterance; | 41 class PlatformSpeechSynthesisUtterance; |
| 42 class WebSpeechSynthesizer; |
| 43 class WebSpeechSynthesizerClient; |
47 class WebSpeechSynthesizerClientImpl; | 44 class WebSpeechSynthesizerClientImpl; |
48 | 45 |
49 class PlatformSpeechSynthesizerClient : public GarbageCollectedMixin { | 46 class PlatformSpeechSynthesizerClient : public GarbageCollectedMixin { |
50 public: | 47 public: |
51 virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance*) = 0; | 48 virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance*) = 0; |
52 virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance*) = 0; | 49 virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance*) = 0; |
53 virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance*) = 0; | 50 virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance*) = 0; |
54 virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance*) = 0; | 51 virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance*) = 0; |
55 virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance*) = 0; | 52 virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance*) = 0; |
56 virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance*, Speech
Boundary, unsigned charIndex) = 0; | 53 virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance*, Speech
Boundary, unsigned charIndex) = 0; |
(...skipping 25 matching lines...) Expand all Loading... |
82 protected: | 79 protected: |
83 explicit PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient*); | 80 explicit PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient*); |
84 | 81 |
85 virtual void initializeVoiceList(); | 82 virtual void initializeVoiceList(); |
86 | 83 |
87 HeapVector<Member<PlatformSpeechSynthesisVoice> > m_voiceList; | 84 HeapVector<Member<PlatformSpeechSynthesisVoice> > m_voiceList; |
88 | 85 |
89 private: | 86 private: |
90 Member<PlatformSpeechSynthesizerClient> m_speechSynthesizerClient; | 87 Member<PlatformSpeechSynthesizerClient> m_speechSynthesizerClient; |
91 | 88 |
92 OwnPtr<blink::WebSpeechSynthesizer> m_webSpeechSynthesizer; | 89 OwnPtr<WebSpeechSynthesizer> m_webSpeechSynthesizer; |
93 Member<blink::WebSpeechSynthesizerClientImpl> m_webSpeechSynthesizerClient; | 90 Member<WebSpeechSynthesizerClientImpl> m_webSpeechSynthesizerClient; |
94 }; | 91 }; |
95 | 92 |
96 } // namespace blink | 93 } // namespace blink |
97 | 94 |
98 #endif // PlatformSpeechSynthesizer_h | 95 #endif // PlatformSpeechSynthesizer_h |
OLD | NEW |