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

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

Issue 2577053002: ActiveScriptWrappable: GC wrappers in detached ExecutionContexts. (Closed)
Patch Set: component build fix(msvc) Created 4 years 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 m_controller = nullptr; 155 m_controller = nullptr;
156 if (hasPendingActivity()) 156 if (hasPendingActivity())
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<SpeechRecognition>(this),
166 SuspendableObject(context), 166 SuspendableObject(context),
167 m_grammars(SpeechGrammarList::create()), // FIXME: The spec is not clear 167 m_grammars(SpeechGrammarList::create()), // FIXME: The spec is not clear
168 // on the default value for the 168 // on the default value for the
169 // grammars attribute. 169 // grammars attribute.
170 m_audioTrack(nullptr), 170 m_audioTrack(nullptr),
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(SpeechRecognitionController::from(page)), 174 m_controller(SpeechRecognitionController::from(page)),
175 m_started(false), 175 m_started(false),
176 m_stopping(false) { 176 m_stopping(false) {
177 // FIXME: Need to hook up with Page to get notified when the visibility 177 // FIXME: Need to hook up with Page to get notified when the visibility
178 // changes. 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 SuspendableObject::trace(visitor); 189 SuspendableObject::trace(visitor);
190 } 190 }
191 191
192 } // namespace blink 192 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/speech/SpeechRecognition.h ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698