| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/dom/ExceptionCode.h" | 30 #include "core/dom/ExceptionCode.h" |
| 31 #include "core/page/Page.h" | 31 #include "core/page/Page.h" |
| 32 #include "modules/mediastream/MediaStreamTrack.h" | 32 #include "modules/mediastream/MediaStreamTrack.h" |
| 33 #include "modules/speech/SpeechRecognitionController.h" | 33 #include "modules/speech/SpeechRecognitionController.h" |
| 34 #include "modules/speech/SpeechRecognitionError.h" | 34 #include "modules/speech/SpeechRecognitionError.h" |
| 35 #include "modules/speech/SpeechRecognitionEvent.h" | 35 #include "modules/speech/SpeechRecognitionEvent.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 SpeechRecognition* SpeechRecognition::Create(ExecutionContext* context) { | 39 SpeechRecognition* SpeechRecognition::Create(ExecutionContext* context) { |
| 40 ASSERT(context && context->IsDocument()); | 40 DCHECK(context); |
| 41 DCHECK(context->IsDocument()); |
| 41 Document* document = ToDocument(context); | 42 Document* document = ToDocument(context); |
| 42 DCHECK(document); | 43 DCHECK(document); |
| 43 return new SpeechRecognition(document->GetPage(), context); | 44 return new SpeechRecognition(document->GetPage(), context); |
| 44 } | 45 } |
| 45 | 46 |
| 46 void SpeechRecognition::start(ExceptionState& exception_state) { | 47 void SpeechRecognition::start(ExceptionState& exception_state) { |
| 47 if (!controller_) | 48 if (!controller_) |
| 48 return; | 49 return; |
| 49 | 50 |
| 50 if (started_) { | 51 if (started_) { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 DEFINE_TRACE(SpeechRecognition) { | 181 DEFINE_TRACE(SpeechRecognition) { |
| 181 visitor->Trace(grammars_); | 182 visitor->Trace(grammars_); |
| 182 visitor->Trace(audio_track_); | 183 visitor->Trace(audio_track_); |
| 183 visitor->Trace(controller_); | 184 visitor->Trace(controller_); |
| 184 visitor->Trace(final_results_); | 185 visitor->Trace(final_results_); |
| 185 EventTargetWithInlineData::Trace(visitor); | 186 EventTargetWithInlineData::Trace(visitor); |
| 186 ContextLifecycleObserver::Trace(visitor); | 187 ContextLifecycleObserver::Trace(visitor); |
| 187 } | 188 } |
| 188 | 189 |
| 189 } // namespace blink | 190 } // namespace blink |
| OLD | NEW |