| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 abort(); | 157 abort(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool SpeechRecognition::hasPendingActivity() const { | 160 bool SpeechRecognition::hasPendingActivity() const { |
| 161 return m_started; | 161 return m_started; |
| 162 } | 162 } |
| 163 | 163 |
| 164 SpeechRecognition::SpeechRecognition(Page* page, ExecutionContext* context) | 164 SpeechRecognition::SpeechRecognition(Page* page, ExecutionContext* context) |
| 165 : ActiveScriptWrappable(this), | 165 : ActiveScriptWrappable(this), |
| 166 ActiveDOMObject(context), | 166 ActiveDOMObject(context), |
| 167 m_grammars( | 167 m_grammars(SpeechGrammarList::create()), // FIXME: The spec is not clear |
| 168 SpeechGrammarList:: | 168 // on the default value for the |
| 169 create()) // FIXME: The spec is not clear on the default value fo
r the grammars attribute. | 169 // grammars attribute. |
| 170 , | |
| 171 m_audioTrack(nullptr), | 170 m_audioTrack(nullptr), |
| 172 m_continuous(false), | 171 m_continuous(false), |
| 173 m_interimResults(false), | 172 m_interimResults(false), |
| 174 m_maxAlternatives(1), | 173 m_maxAlternatives(1), |
| 175 m_controller(SpeechRecognitionController::from(page)), | 174 m_controller(SpeechRecognitionController::from(page)), |
| 176 m_started(false), | 175 m_started(false), |
| 177 m_stopping(false) { | 176 m_stopping(false) { |
| 178 // FIXME: Need to hook up with Page to get notified when the visibility change
s. | 177 // FIXME: Need to hook up with Page to get notified when the visibility |
| 178 // changes. |
| 179 } | 179 } |
| 180 | 180 |
| 181 SpeechRecognition::~SpeechRecognition() {} | 181 SpeechRecognition::~SpeechRecognition() {} |
| 182 | 182 |
| 183 DEFINE_TRACE(SpeechRecognition) { | 183 DEFINE_TRACE(SpeechRecognition) { |
| 184 visitor->trace(m_grammars); | 184 visitor->trace(m_grammars); |
| 185 visitor->trace(m_audioTrack); | 185 visitor->trace(m_audioTrack); |
| 186 visitor->trace(m_controller); | 186 visitor->trace(m_controller); |
| 187 visitor->trace(m_finalResults); | 187 visitor->trace(m_finalResults); |
| 188 EventTargetWithInlineData::trace(visitor); | 188 EventTargetWithInlineData::trace(visitor); |
| 189 ActiveDOMObject::trace(visitor); | 189 ActiveDOMObject::trace(visitor); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |