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

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

Issue 1461193003: Revert of [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make patch applicable Created 5 years, 1 month 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 30 matching lines...) Expand all
41 SpeechRecognition* SpeechRecognition::create(ExecutionContext* context) 41 SpeechRecognition* SpeechRecognition::create(ExecutionContext* context)
42 { 42 {
43 ASSERT(context && context->isDocument()); 43 ASSERT(context && context->isDocument());
44 Document* document = toDocument(context); 44 Document* document = toDocument(context);
45 ASSERT(document); 45 ASSERT(document);
46 SpeechRecognition* speechRecognition = new SpeechRecognition(document->page( ), context); 46 SpeechRecognition* speechRecognition = new SpeechRecognition(document->page( ), context);
47 speechRecognition->suspendIfNeeded(); 47 speechRecognition->suspendIfNeeded();
48 return speechRecognition; 48 return speechRecognition;
49 } 49 }
50 50
51 MediaStreamTrack* SpeechRecognition::audioTrack() const
52 {
53 return m_audioTrack;
54 }
55
56 void SpeechRecognition::setAudioTrack(MediaStreamTrack* audioTrack)
57 {
58 m_audioTrack = audioTrack;
59 }
60
61 void SpeechRecognition::start(ExceptionState& exceptionState) 51 void SpeechRecognition::start(ExceptionState& exceptionState)
62 { 52 {
63 if (!m_controller) 53 if (!m_controller)
64 return; 54 return;
65 55
66 if (m_started) { 56 if (m_started) {
67 exceptionState.throwDOMException(InvalidStateError, "recognition has alr eady started."); 57 exceptionState.throwDOMException(InvalidStateError, "recognition has alr eady started.");
68 return; 58 return;
69 } 59 }
70 60
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 visitor->trace(m_grammars); 206 visitor->trace(m_grammars);
217 visitor->trace(m_audioTrack); 207 visitor->trace(m_audioTrack);
218 visitor->trace(m_controller); 208 visitor->trace(m_controller);
219 visitor->trace(m_finalResults); 209 visitor->trace(m_finalResults);
220 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor); 210 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor);
221 PageLifecycleObserver::trace(visitor); 211 PageLifecycleObserver::trace(visitor);
222 ActiveDOMObject::trace(visitor); 212 ActiveDOMObject::trace(visitor);
223 } 213 }
224 214
225 } // namespace blink 215 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698