OLD | NEW |
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 const AtomicString& SpeechSynthesisUtterance::interfaceName() const { | 49 const AtomicString& SpeechSynthesisUtterance::interfaceName() const { |
50 return EventTargetNames::SpeechSynthesisUtterance; | 50 return EventTargetNames::SpeechSynthesisUtterance; |
51 } | 51 } |
52 | 52 |
53 SpeechSynthesisVoice* SpeechSynthesisUtterance::voice() const { | 53 SpeechSynthesisVoice* SpeechSynthesisUtterance::voice() const { |
54 return m_voice; | 54 return m_voice; |
55 } | 55 } |
56 | 56 |
57 void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice) { | 57 void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice) { |
58 // Cache our own version of the SpeechSynthesisVoice so that we don't have to
do some lookup | 58 // Cache our own version of the SpeechSynthesisVoice so that we don't have to |
59 // to go from the platform voice back to the speech synthesis voice in the rea
d property. | 59 // do some lookup to go from the platform voice back to the speech synthesis |
| 60 // voice in the read property. |
60 m_voice = voice; | 61 m_voice = voice; |
61 | 62 |
62 if (voice) | 63 if (voice) |
63 m_platformUtterance->setVoice(voice->platformVoice()); | 64 m_platformUtterance->setVoice(voice->platformVoice()); |
64 } | 65 } |
65 | 66 |
66 DEFINE_TRACE(SpeechSynthesisUtterance) { | 67 DEFINE_TRACE(SpeechSynthesisUtterance) { |
67 visitor->trace(m_platformUtterance); | 68 visitor->trace(m_platformUtterance); |
68 visitor->trace(m_voice); | 69 visitor->trace(m_voice); |
69 EventTargetWithInlineData::trace(visitor); | 70 EventTargetWithInlineData::trace(visitor); |
70 ContextLifecycleObserver::trace(visitor); | 71 ContextLifecycleObserver::trace(visitor); |
71 } | 72 } |
72 | 73 |
73 } // namespace blink | 74 } // namespace blink |
OLD | NEW |