| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 { | 164 { |
| 165 return m_started; | 165 return m_started; |
| 166 } | 166 } |
| 167 | 167 |
| 168 SpeechRecognition::SpeechRecognition(ExecutionContext* context) | 168 SpeechRecognition::SpeechRecognition(ExecutionContext* context) |
| 169 : ActiveDOMObject(context) | 169 : ActiveDOMObject(context) |
| 170 , m_grammars(SpeechGrammarList::create()) // FIXME: The spec is not clear on
the default value for the grammars attribute. | 170 , m_grammars(SpeechGrammarList::create()) // FIXME: The spec is not clear on
the default value for the grammars attribute. |
| 171 , m_continuous(false) | 171 , m_continuous(false) |
| 172 , m_interimResults(false) | 172 , m_interimResults(false) |
| 173 , m_maxAlternatives(1) | 173 , m_maxAlternatives(1) |
| 174 , m_controller(0) | 174 , m_controller(nullptr) |
| 175 , m_stoppedByActiveDOMObject(false) | 175 , m_stoppedByActiveDOMObject(false) |
| 176 , m_started(false) | 176 , m_started(false) |
| 177 , m_stopping(false) | 177 , m_stopping(false) |
| 178 { | 178 { |
| 179 ScriptWrappable::init(this); | 179 ScriptWrappable::init(this); |
| 180 Document* document = toDocument(executionContext()); | 180 Document* document = toDocument(executionContext()); |
| 181 | 181 |
| 182 Page* page = document->page(); | 182 Page* page = document->page(); |
| 183 ASSERT(page); | 183 ASSERT(page); |
| 184 | 184 |
| 185 m_controller = SpeechRecognitionController::from(page); | 185 m_controller = SpeechRecognitionController::from(page); |
| 186 ASSERT(m_controller); | 186 ASSERT(m_controller); |
| 187 | 187 |
| 188 // FIXME: Need to hook up with Page to get notified when the visibility chan
ges. | 188 // FIXME: Need to hook up with Page to get notified when the visibility chan
ges. |
| 189 } | 189 } |
| 190 | 190 |
| 191 SpeechRecognition::~SpeechRecognition() | 191 SpeechRecognition::~SpeechRecognition() |
| 192 { | 192 { |
| 193 } | 193 } |
| 194 | 194 |
| 195 void SpeechRecognition::trace(Visitor* visitor) | 195 void SpeechRecognition::trace(Visitor* visitor) |
| 196 { | 196 { |
| 197 visitor->trace(m_grammars); | 197 visitor->trace(m_grammars); |
| 198 #if ENABLE(OILPAN) |
| 199 visitor->trace(m_controller); |
| 200 #endif |
| 198 visitor->trace(m_finalResults); | 201 visitor->trace(m_finalResults); |
| 199 EventTargetWithInlineData::trace(visitor); | 202 EventTargetWithInlineData::trace(visitor); |
| 200 } | 203 } |
| 201 | 204 |
| 202 } // namespace WebCore | 205 } // namespace WebCore |
| OLD | NEW |