Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 * * Redistributions of source code must retain the above copyright | 7 * * 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 * * Redistributions in binary form must reproduce the above copyright | 9 * * 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 class SpeechRecognitionError; | 43 class SpeechRecognitionError; |
| 44 | 44 |
| 45 class SpeechRecognition FINAL : public RefCountedGarbageCollectedWillBeGarbageCo llectedFinalized<SpeechRecognition>, public ScriptWrappable, public ActiveDOMObj ect, public EventTargetWithInlineData { | 45 class SpeechRecognition FINAL : public RefCountedGarbageCollectedWillBeGarbageCo llectedFinalized<SpeechRecognition>, public ScriptWrappable, public ActiveDOMObj ect, public EventTargetWithInlineData { |
| 46 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S peechRecognition>); | 46 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S peechRecognition>); |
| 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SpeechRecognition); | 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SpeechRecognition); |
| 48 public: | 48 public: |
| 49 static SpeechRecognition* create(ExecutionContext*); | 49 static SpeechRecognition* create(ExecutionContext*); |
| 50 virtual ~SpeechRecognition(); | 50 virtual ~SpeechRecognition(); |
| 51 | 51 |
| 52 // Attributes. | 52 // Attributes. |
| 53 SpeechGrammarList* grammars() { return m_grammars.get(); } | 53 SpeechGrammarList* grammars() { return m_grammars; } |
| 54 void setGrammars(SpeechGrammarList* grammars) { m_grammars = grammars; } | 54 void setGrammars(SpeechGrammarList* grammars) { m_grammars = grammars; } |
| 55 String lang() { return m_lang; } | 55 String lang() { return m_lang; } |
| 56 void setLang(const String& lang) { m_lang = lang; } | 56 void setLang(const String& lang) { m_lang = lang; } |
| 57 bool continuous() { return m_continuous; } | 57 bool continuous() { return m_continuous; } |
| 58 void setContinuous(bool continuous) { m_continuous = continuous; } | 58 void setContinuous(bool continuous) { m_continuous = continuous; } |
| 59 bool interimResults() { return m_interimResults; } | 59 bool interimResults() { return m_interimResults; } |
| 60 void setInterimResults(bool interimResults) { m_interimResults = interimResu lts; } | 60 void setInterimResults(bool interimResults) { m_interimResults = interimResu lts; } |
| 61 unsigned long maxAlternatives() { return m_maxAlternatives; } | 61 unsigned long maxAlternatives() { return m_maxAlternatives; } |
| 62 void setMaxAlternatives(unsigned long maxAlternatives) { m_maxAlternatives = maxAlternatives; } | 62 void setMaxAlternatives(unsigned long maxAlternatives) { m_maxAlternatives = maxAlternatives; } |
| 63 | 63 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 explicit SpeechRecognition(ExecutionContext*); | 105 explicit SpeechRecognition(ExecutionContext*); |
| 106 | 106 |
| 107 Member<SpeechGrammarList> m_grammars; | 107 Member<SpeechGrammarList> m_grammars; |
| 108 String m_lang; | 108 String m_lang; |
| 109 bool m_continuous; | 109 bool m_continuous; |
| 110 bool m_interimResults; | 110 bool m_interimResults; |
| 111 unsigned long m_maxAlternatives; | 111 unsigned long m_maxAlternatives; |
| 112 | 112 |
| 113 SpeechRecognitionController* m_controller; | 113 SpeechRecognitionController* m_controller; |
|
haraken
2014/06/17 09:18:50
SpeechRecognitionController is on-heap, so can we
sof
2014/06/17 09:26:07
Not always, but yes, will tidy this up.
sof
2014/06/17 10:42:09
Well spotted - it's a straight bug (and not just a
| |
| 114 bool m_stoppedByActiveDOMObject; | 114 bool m_stoppedByActiveDOMObject; |
| 115 bool m_started; | 115 bool m_started; |
| 116 bool m_stopping; | 116 bool m_stopping; |
| 117 HeapVector<Member<SpeechRecognitionResult> > m_finalResults; | 117 HeapVector<Member<SpeechRecognitionResult> > m_finalResults; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace WebCore | 120 } // namespace WebCore |
| 121 | 121 |
| 122 #endif // SpeechRecognition_h | 122 #endif // SpeechRecognition_h |
| OLD | NEW |