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

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

Issue 339823003: Oilpan: move platform speech objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Trace SpeechRecognition's controller reference. Created 6 years, 6 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/v8/ScriptWrappable.h" 29 #include "bindings/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/PassRefPtr.h"
33 #include "wtf/RefCounted.h"
34 #include "wtf/text/WTFString.h" 32 #include "wtf/text/WTFString.h"
35 33
36 namespace WebCore { 34 namespace WebCore {
37 35
38 class SpeechSynthesisVoice FINAL : public GarbageCollectedFinalized<SpeechSynthe sisVoice>, public ScriptWrappable { 36 class SpeechSynthesisVoice FINAL : public GarbageCollectedFinalized<SpeechSynthe sisVoice>, public ScriptWrappable {
39 public: 37 public:
40 static SpeechSynthesisVoice* create(PassRefPtr<PlatformSpeechSynthesisVoice> ); 38 static SpeechSynthesisVoice* create(PlatformSpeechSynthesisVoice*);
41 39
42 const String& voiceURI() const { return m_platformVoice->voiceURI(); } 40 const String& voiceURI() const { return m_platformVoice->voiceURI(); }
43 const String& name() const { return m_platformVoice->name(); } 41 const String& name() const { return m_platformVoice->name(); }
44 const String& lang() const { return m_platformVoice->lang(); } 42 const String& lang() const { return m_platformVoice->lang(); }
45 bool localService() const { return m_platformVoice->localService(); } 43 bool localService() const { return m_platformVoice->localService(); }
46 bool isDefault() const { return m_platformVoice->isDefault(); } 44 bool isDefault() const { return m_platformVoice->isDefault(); }
47 45
48 PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice .get(); } 46 PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice ; }
49 47
50 void trace(Visitor*) { } 48 void trace(Visitor*);
51 49
52 private: 50 private:
53 explicit SpeechSynthesisVoice(PassRefPtr<PlatformSpeechSynthesisVoice>); 51 explicit SpeechSynthesisVoice(PlatformSpeechSynthesisVoice*);
54 52
55 RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice; 53 Member<PlatformSpeechSynthesisVoice> m_platformVoice;
56 }; 54 };
57 55
58 } // namespace WebCore 56 } // namespace WebCore
59 57
60 #endif // SpeechSynthesisVoice_h 58 #endif // SpeechSynthesisVoice_h
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechSynthesisUtterance.cpp ('k') | Source/modules/speech/SpeechSynthesisVoice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698