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

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

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CORE_EXPORT 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
51 void SpeechRecognition::start(ExceptionState& exceptionState) 61 void SpeechRecognition::start(ExceptionState& exceptionState)
52 { 62 {
53 if (!m_controller) 63 if (!m_controller)
54 return; 64 return;
55 65
56 if (m_started) { 66 if (m_started) {
57 exceptionState.throwDOMException(InvalidStateError, "recognition has alr eady started."); 67 exceptionState.throwDOMException(InvalidStateError, "recognition has alr eady started.");
58 return; 68 return;
59 } 69 }
60 70
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 visitor->trace(m_grammars); 216 visitor->trace(m_grammars);
207 visitor->trace(m_audioTrack); 217 visitor->trace(m_audioTrack);
208 visitor->trace(m_controller); 218 visitor->trace(m_controller);
209 visitor->trace(m_finalResults); 219 visitor->trace(m_finalResults);
210 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor); 220 RefCountedGarbageCollectedEventTargetWithInlineData<SpeechRecognition>::trac e(visitor);
211 PageLifecycleObserver::trace(visitor); 221 PageLifecycleObserver::trace(visitor);
212 ActiveDOMObject::trace(visitor); 222 ActiveDOMObject::trace(visitor);
213 } 223 }
214 224
215 } // namespace blink 225 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698