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

Side by Side Diff: third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h

Issue 1617383003: Move PlatformSpeechSynthesisVoice off the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix oilpan compilation Created 4 years, 11 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 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef SpeechSynthesisVoice_h 26 #ifndef SpeechSynthesisVoice_h
27 #define SpeechSynthesisVoice_h 27 #define SpeechSynthesisVoice_h
28 28
29 #include "bindings/core/v8/ScriptWrappable.h" 29 #include "bindings/core/v8/ScriptWrappable.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 #include "platform/speech/PlatformSpeechSynthesisVoice.h" 31 #include "platform/speech/PlatformSpeechSynthesisVoice.h"
32 #include "wtf/Forward.h"
32 #include "wtf/text/WTFString.h" 33 #include "wtf/text/WTFString.h"
33 34
34 namespace blink { 35 namespace blink {
35 36
36 class SpeechSynthesisVoice final : public GarbageCollected<SpeechSynthesisVoice> , public ScriptWrappable { 37 class SpeechSynthesisVoice final : public GarbageCollectedFinalized<SpeechSynthe sisVoice>, public ScriptWrappable {
37 DEFINE_WRAPPERTYPEINFO(); 38 DEFINE_WRAPPERTYPEINFO();
38 public: 39 public:
39 static SpeechSynthesisVoice* create(PlatformSpeechSynthesisVoice*); 40 static SpeechSynthesisVoice* create(PassRefPtr<PlatformSpeechSynthesisVoice> );
41 ~SpeechSynthesisVoice();
40 42
41 const String& voiceURI() const { return m_platformVoice->voiceURI(); } 43 const String& voiceURI() const { return m_platformVoice->voiceURI(); }
42 const String& name() const { return m_platformVoice->name(); } 44 const String& name() const { return m_platformVoice->name(); }
43 const String& lang() const { return m_platformVoice->lang(); } 45 const String& lang() const { return m_platformVoice->lang(); }
44 bool localService() const { return m_platformVoice->localService(); } 46 bool localService() const { return m_platformVoice->localService(); }
45 bool isDefault() const { return m_platformVoice->isDefault(); } 47 bool isDefault() const { return m_platformVoice->isDefault(); }
46 48
47 PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice ; } 49 PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice .get(); }
48 50
49 DECLARE_TRACE(); 51 DEFINE_INLINE_TRACE() { }
50 52
51 private: 53 private:
52 explicit SpeechSynthesisVoice(PlatformSpeechSynthesisVoice*); 54 explicit SpeechSynthesisVoice(PassRefPtr<PlatformSpeechSynthesisVoice>);
53 55
54 Member<PlatformSpeechSynthesisVoice> m_platformVoice; 56 RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice;
55 }; 57 };
56 58
57 } // namespace blink 59 } // namespace blink
58 60
59 #endif // SpeechSynthesisVoice_h 61 #endif // SpeechSynthesisVoice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698