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

Side by Side Diff: Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/speech/SpeechSynthesis.cpp ('k') | Source/modules/webaudio/AudioBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock() 48 PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock()
49 { 49 {
50 m_speakingFinishedTimer.stop(); 50 m_speakingFinishedTimer.stop();
51 } 51 }
52 52
53 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthes izerMock>*) 53 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthes izerMock>*)
54 { 54 {
55 ASSERT(m_utterance.get()); 55 ASSERT(m_utterance.get());
56 client()->didFinishSpeaking(m_utterance); 56 client()->didFinishSpeaking(m_utterance);
57 m_utterance = 0; 57 m_utterance = nullptr;
58 } 58 }
59 59
60 void PlatformSpeechSynthesizerMock::initializeVoiceList() 60 void PlatformSpeechSynthesizerMock::initializeVoiceList()
61 { 61 {
62 m_voiceList.clear(); 62 m_voiceList.clear();
63 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.b ruce"), String("bruce"), String("en-US"), true, true)); 63 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.b ruce"), String("bruce"), String("en-US"), true, true));
64 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.c lark"), String("clark"), String("en-US"), true, false)); 64 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.c lark"), String("clark"), String("en-US"), true, false));
65 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.l ogan"), String("logan"), String("fr-CA"), true, true)); 65 m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.l ogan"), String("logan"), String("fr-CA"), true, true));
66 } 66 }
67 67
(...skipping 11 matching lines...) Expand all
79 m_speakingFinishedTimer.startOneShot(.1); 79 m_speakingFinishedTimer.startOneShot(.1);
80 } 80 }
81 81
82 void PlatformSpeechSynthesizerMock::cancel() 82 void PlatformSpeechSynthesizerMock::cancel()
83 { 83 {
84 if (!m_utterance) 84 if (!m_utterance)
85 return; 85 return;
86 86
87 m_speakingFinishedTimer.stop(); 87 m_speakingFinishedTimer.stop();
88 client()->speakingErrorOccurred(m_utterance); 88 client()->speakingErrorOccurred(m_utterance);
89 m_utterance = 0; 89 m_utterance = nullptr;
90 } 90 }
91 91
92 void PlatformSpeechSynthesizerMock::pause() 92 void PlatformSpeechSynthesizerMock::pause()
93 { 93 {
94 client()->didPauseSpeaking(m_utterance); 94 client()->didPauseSpeaking(m_utterance);
95 } 95 }
96 96
97 void PlatformSpeechSynthesizerMock::resume() 97 void PlatformSpeechSynthesizerMock::resume()
98 { 98 {
99 client()->didResumeSpeaking(m_utterance); 99 client()->didResumeSpeaking(m_utterance);
100 } 100 }
101 101
102 102
103 } // namespace WebCore 103 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechSynthesis.cpp ('k') | Source/modules/webaudio/AudioBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698