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

Side by Side Diff: third_party/WebKit/Source/modules/speech/SpeechRecognition.cpp

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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) 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 abort(); 168 abort();
169 } 169 }
170 170
171 bool SpeechRecognition::hasPendingActivity() const 171 bool SpeechRecognition::hasPendingActivity() const
172 { 172 {
173 return m_started; 173 return m_started;
174 } 174 }
175 175
176 SpeechRecognition::SpeechRecognition(Page* page, ExecutionContext* context) 176 SpeechRecognition::SpeechRecognition(Page* page, ExecutionContext* context)
177 : PageLifecycleObserver(page) 177 : PageLifecycleObserver(page)
178 , ActiveScriptWrappable(this)
178 , ActiveDOMObject(context) 179 , ActiveDOMObject(context)
179 , m_grammars(SpeechGrammarList::create()) // FIXME: The spec is not clear on the default value for the grammars attribute. 180 , m_grammars(SpeechGrammarList::create()) // FIXME: The spec is not clear on the default value for the grammars attribute.
180 , m_audioTrack(nullptr) 181 , m_audioTrack(nullptr)
181 , m_continuous(false) 182 , m_continuous(false)
182 , m_interimResults(false) 183 , m_interimResults(false)
183 , m_maxAlternatives(1) 184 , m_maxAlternatives(1)
184 , m_controller(SpeechRecognitionController::from(page)) 185 , m_controller(SpeechRecognitionController::from(page))
185 , m_stoppedByActiveDOMObject(false) 186 , m_stoppedByActiveDOMObject(false)
186 , m_started(false) 187 , m_started(false)
187 , m_stopping(false) 188 , m_stopping(false)
(...skipping 16 matching lines...) Expand all
204 visitor->trace(m_grammars); 205 visitor->trace(m_grammars);
205 visitor->trace(m_audioTrack); 206 visitor->trace(m_audioTrack);
206 visitor->trace(m_controller); 207 visitor->trace(m_controller);
207 visitor->trace(m_finalResults); 208 visitor->trace(m_finalResults);
208 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor); 209 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor);
209 PageLifecycleObserver::trace(visitor); 210 PageLifecycleObserver::trace(visitor);
210 ActiveDOMObject::trace(visitor); 211 ActiveDOMObject::trace(visitor);
211 } 212 }
212 213
213 } // namespace blink 214 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698