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

Side by Side Diff: Source/modules/speech/SpeechSynthesis.h

Issue 635233004: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/modules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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 21 matching lines...) Expand all
32 #include "modules/speech/SpeechSynthesisVoice.h" 32 #include "modules/speech/SpeechSynthesisVoice.h"
33 #include "platform/heap/Handle.h" 33 #include "platform/heap/Handle.h"
34 #include "platform/speech/PlatformSpeechSynthesisUtterance.h" 34 #include "platform/speech/PlatformSpeechSynthesisUtterance.h"
35 #include "platform/speech/PlatformSpeechSynthesizer.h" 35 #include "platform/speech/PlatformSpeechSynthesizer.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ExceptionState; 39 class ExceptionState;
40 class PlatformSpeechSynthesizerClient; 40 class PlatformSpeechSynthesizerClient;
41 41
42 class SpeechSynthesis FINAL : public RefCountedGarbageCollectedWillBeGarbageColl ectedFinalized<SpeechSynthesis>, public PlatformSpeechSynthesizerClient, public ContextLifecycleObserver, public EventTargetWithInlineData { 42 class SpeechSynthesis final : public RefCountedGarbageCollectedWillBeGarbageColl ectedFinalized<SpeechSynthesis>, public PlatformSpeechSynthesizerClient, public ContextLifecycleObserver, public EventTargetWithInlineData {
43 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S peechSynthesis>); 43 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S peechSynthesis>);
44 DEFINE_WRAPPERTYPEINFO(); 44 DEFINE_WRAPPERTYPEINFO();
45 USING_GARBAGE_COLLECTED_MIXIN(SpeechSynthesis); 45 USING_GARBAGE_COLLECTED_MIXIN(SpeechSynthesis);
46 public: 46 public:
47 static SpeechSynthesis* create(ExecutionContext*); 47 static SpeechSynthesis* create(ExecutionContext*);
48 48
49 bool pending() const; 49 bool pending() const;
50 bool speaking() const; 50 bool speaking() const;
51 bool paused() const; 51 bool paused() const;
52 52
53 void speak(SpeechSynthesisUtterance*, ExceptionState&); 53 void speak(SpeechSynthesisUtterance*, ExceptionState&);
54 void cancel(); 54 void cancel();
55 void pause(); 55 void pause();
56 void resume(); 56 void resume();
57 57
58 const HeapVector<Member<SpeechSynthesisVoice> >& getVoices(); 58 const HeapVector<Member<SpeechSynthesisVoice> >& getVoices();
59 59
60 // Used in testing to use a mock platform synthesizer 60 // Used in testing to use a mock platform synthesizer
61 void setPlatformSynthesizer(PlatformSpeechSynthesizer*); 61 void setPlatformSynthesizer(PlatformSpeechSynthesizer*);
62 62
63 DEFINE_ATTRIBUTE_EVENT_LISTENER(voiceschanged); 63 DEFINE_ATTRIBUTE_EVENT_LISTENER(voiceschanged);
64 64
65 virtual ExecutionContext* executionContext() const OVERRIDE; 65 virtual ExecutionContext* executionContext() const override;
66 66
67 virtual void trace(Visitor*) OVERRIDE; 67 virtual void trace(Visitor*) override;
68 68
69 private: 69 private:
70 explicit SpeechSynthesis(ExecutionContext*); 70 explicit SpeechSynthesis(ExecutionContext*);
71 71
72 // PlatformSpeechSynthesizerClient override methods. 72 // PlatformSpeechSynthesizerClient override methods.
73 virtual void voicesDidChange() OVERRIDE; 73 virtual void voicesDidChange() override;
74 virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance*) OVERRIDE; 74 virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance*) override;
75 virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance*) OVERRIDE; 75 virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance*) override;
76 virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance*) OVERRIDE; 76 virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance*) override;
77 virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance*) OVERRIDE; 77 virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance*) override;
78 virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance*) OVERRI DE; 78 virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance*) overri de;
79 virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance*, Speech Boundary, unsigned charIndex) OVERRIDE; 79 virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance*, Speech Boundary, unsigned charIndex) override;
80 80
81 void startSpeakingImmediately(); 81 void startSpeakingImmediately();
82 void handleSpeakingCompleted(SpeechSynthesisUtterance*, bool errorOccurred); 82 void handleSpeakingCompleted(SpeechSynthesisUtterance*, bool errorOccurred);
83 void fireEvent(const AtomicString& type, SpeechSynthesisUtterance*, unsigned long charIndex, const String& name); 83 void fireEvent(const AtomicString& type, SpeechSynthesisUtterance*, unsigned long charIndex, const String& name);
84 84
85 // Returns the utterance at the front of the queue. 85 // Returns the utterance at the front of the queue.
86 SpeechSynthesisUtterance* currentSpeechUtterance() const; 86 SpeechSynthesisUtterance* currentSpeechUtterance() const;
87 87
88 Member<PlatformSpeechSynthesizer> m_platformSpeechSynthesizer; 88 Member<PlatformSpeechSynthesizer> m_platformSpeechSynthesizer;
89 HeapVector<Member<SpeechSynthesisVoice> > m_voiceList; 89 HeapVector<Member<SpeechSynthesisVoice> > m_voiceList;
90 HeapDeque<Member<SpeechSynthesisUtterance> > m_utteranceQueue; 90 HeapDeque<Member<SpeechSynthesisUtterance> > m_utteranceQueue;
91 bool m_isPaused; 91 bool m_isPaused;
92 92
93 // EventTarget 93 // EventTarget
94 virtual const AtomicString& interfaceName() const OVERRIDE; 94 virtual const AtomicString& interfaceName() const override;
95 }; 95 };
96 96
97 } // namespace blink 97 } // namespace blink
98 98
99 #endif // SpeechSynthesisEvent_h 99 #endif // SpeechSynthesisEvent_h
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechRecognitionResult.h ('k') | Source/modules/speech/SpeechSynthesisEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698