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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |