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

Side by Side Diff: Source/modules/speech/SpeechSynthesisUtterance.cpp

Issue 884973003: Extend PlatformSpeechSynthesizerMock with an utterance queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: minor test tidying Created 5 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return ContextLifecycleObserver::executionContext(); 49 return ContextLifecycleObserver::executionContext();
50 } 50 }
51 51
52 const AtomicString& SpeechSynthesisUtterance::interfaceName() const 52 const AtomicString& SpeechSynthesisUtterance::interfaceName() const
53 { 53 {
54 return EventTargetNames::SpeechSynthesisUtterance; 54 return EventTargetNames::SpeechSynthesisUtterance;
55 } 55 }
56 56
57 SpeechSynthesisVoice* SpeechSynthesisUtterance::voice() const 57 SpeechSynthesisVoice* SpeechSynthesisUtterance::voice() const
58 { 58 {
59 return m_voice.get(); 59 return m_voice;
60 } 60 }
61 61
62 void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice) 62 void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice)
63 { 63 {
64 // Cache our own version of the SpeechSynthesisVoice so that we don't have t o do some lookup 64 // Cache our own version of the SpeechSynthesisVoice so that we don't have t o do some lookup
65 // to go from the platform voice back to the speech synthesis voice in the r ead property. 65 // to go from the platform voice back to the speech synthesis voice in the r ead property.
66 m_voice = voice; 66 m_voice = voice;
67 67
68 if (voice) 68 if (voice)
69 m_platformUtterance->setVoice(voice->platformVoice()); 69 m_platformUtterance->setVoice(voice->platformVoice());
70 } 70 }
71 71
72 void SpeechSynthesisUtterance::trace(Visitor* visitor) 72 void SpeechSynthesisUtterance::trace(Visitor* visitor)
73 { 73 {
74 visitor->trace(m_platformUtterance); 74 visitor->trace(m_platformUtterance);
75 visitor->trace(m_voice); 75 visitor->trace(m_voice);
76 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechSynthesisUtterance >::trace(visitor); 76 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechSynthesisUtterance >::trace(visitor);
77 ContextLifecycleObserver::trace(visitor); 77 ContextLifecycleObserver::trace(visitor);
78 } 78 }
79 79
80 } // namespace blink 80 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechSynthesis.cpp ('k') | Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698