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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 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 | Annotate | Revision Log
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 27 matching lines...) Expand all
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 PassRefPtr<SpeechRecognition> SpeechRecognition::create(ExecutionContext* contex t) 41 PassRefPtr<SpeechRecognition> SpeechRecognition::create(ExecutionContext* contex t)
42 { 42 {
43 RefPtr<SpeechRecognition> speechRecognition(adoptRef(new SpeechRecognition(c ontext))); 43 RefPtr<SpeechRecognition> speechRecognition(adoptRef(new SpeechRecognition(c ontext)));
44 speechRecognition->suspendIfNeeded(); 44 speechRecognition->suspendIfNeeded();
45 return speechRecognition.release(); 45 return speechRecognition.release();
46 } 46 }
47 47
48 void SpeechRecognition::start(ExceptionState& es) 48 void SpeechRecognition::start(ExceptionState& exceptionState)
49 { 49 {
50 ASSERT(m_controller); 50 ASSERT(m_controller);
51 if (m_started) { 51 if (m_started) {
52 es.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecu te("start", "SpeechRecognition", "recognition has already started.")); 52 exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::f ailedToExecute("start", "SpeechRecognition", "recognition has already started.") );
53 return; 53 return;
54 } 54 }
55 55
56 setPendingActivity(this); 56 setPendingActivity(this);
57 m_finalResults.clear(); 57 m_finalResults.clear();
58 m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimR esults, m_maxAlternatives); 58 m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimR esults, m_maxAlternatives);
59 m_started = true; 59 m_started = true;
60 } 60 }
61 61
62 void SpeechRecognition::stopFunction() 62 void SpeechRecognition::stopFunction()
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 ASSERT(m_controller); 184 ASSERT(m_controller);
185 185
186 // FIXME: Need to hook up with Page to get notified when the visibility chan ges. 186 // FIXME: Need to hook up with Page to get notified when the visibility chan ges.
187 } 187 }
188 188
189 SpeechRecognition::~SpeechRecognition() 189 SpeechRecognition::~SpeechRecognition()
190 { 190 {
191 } 191 }
192 192
193 } // namespace WebCore 193 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/NavigatorServiceWorker.cpp ('k') | Source/modules/speech/SpeechSynthesis.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698