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

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

Issue 863213002: Revert of Make SpeechRecognitionController per frame instead of per page. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « no previous file | Source/modules/speech/SpeechRecognitionController.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 , m_continuous(false) 173 , m_continuous(false)
174 , m_interimResults(false) 174 , m_interimResults(false)
175 , m_maxAlternatives(1) 175 , m_maxAlternatives(1)
176 , m_controller(nullptr) 176 , m_controller(nullptr)
177 , m_stoppedByActiveDOMObject(false) 177 , m_stoppedByActiveDOMObject(false)
178 , m_started(false) 178 , m_started(false)
179 , m_stopping(false) 179 , m_stopping(false)
180 { 180 {
181 Document* document = toDocument(executionContext()); 181 Document* document = toDocument(executionContext());
182 182
183 LocalFrame* frame = document->frame(); 183 Page* page = document->page();
184 ASSERT(frame); 184 ASSERT(page);
185 185
186 m_controller = SpeechRecognitionController::from(*frame); 186 m_controller = SpeechRecognitionController::from(page);
187 ASSERT(m_controller); 187 ASSERT(m_controller);
188 188
189 // FIXME: Need to hook up with Page to get notified when the visibility chan ges. 189 // FIXME: Need to hook up with Page to get notified when the visibility chan ges.
190 } 190 }
191 191
192 SpeechRecognition::~SpeechRecognition() 192 SpeechRecognition::~SpeechRecognition()
193 { 193 {
194 } 194 }
195 195
196 void SpeechRecognition::trace(Visitor* visitor) 196 void SpeechRecognition::trace(Visitor* visitor)
197 { 197 {
198 visitor->trace(m_grammars); 198 visitor->trace(m_grammars);
199 visitor->trace(m_audioTrack); 199 visitor->trace(m_audioTrack);
200 #if ENABLE(OILPAN) 200 #if ENABLE(OILPAN)
201 visitor->trace(m_controller); 201 visitor->trace(m_controller);
202 #endif 202 #endif
203 visitor->trace(m_finalResults); 203 visitor->trace(m_finalResults);
204 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor); 204 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor);
205 ActiveDOMObject::trace(visitor); 205 ActiveDOMObject::trace(visitor);
206 } 206 }
207 207
208 } // namespace blink 208 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/modules/speech/SpeechRecognitionController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698