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

Side by Side Diff: Source/core/platform/mock/PlatformSpeechSynthesizerMock.cpp

Issue 27477002: Add support for onvoiceschanged event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@platform_speech_chromium
Patch Set: Check activeDOMObjectsAreStopped, address other feedback Created 7 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 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 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 #include "core/platform/PlatformSpeechSynthesisUtterance.h" 27 #include "core/platform/PlatformSpeechSynthesisUtterance.h"
28 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h" 28 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h"
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create( PlatformSpeechSynthesizerClient* client) 32 PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create( PlatformSpeechSynthesizerClient* client)
33 { 33 {
34 OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpe echSynthesizerMock(client)); 34 OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpe echSynthesizerMock(client));
35 synthesizer->initializeVoiceList(); 35 synthesizer->initializeVoiceList();
36 client->voicesDidChange();
36 return synthesizer.release(); 37 return synthesizer.release();
37 } 38 }
38 39
39 PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynth esizerClient* client) 40 PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynth esizerClient* client)
40 : PlatformSpeechSynthesizer(client) 41 : PlatformSpeechSynthesizer(client)
41 , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFini shed) 42 , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFini shed)
42 { 43 {
43 } 44 }
44 45
45 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() 46 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock()
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 client()->didPauseSpeaking(m_utterance); 92 client()->didPauseSpeaking(m_utterance);
92 } 93 }
93 94
94 void PlatformSpeechSynthesizerMock::resume() 95 void PlatformSpeechSynthesizerMock::resume()
95 { 96 {
96 client()->didResumeSpeaking(m_utterance); 97 client()->didResumeSpeaking(m_utterance);
97 } 98 }
98 99
99 100
100 } // namespace WebCore 101 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/modules/speech/DOMWindowSpeechSynthesis.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698