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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | 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 29 matching lines...) Expand all
40 { 40 {
41 RefPtr<SpeechRecognition> speechRecognition(adoptRef(new SpeechRecognition(c ontext))); 41 RefPtr<SpeechRecognition> speechRecognition(adoptRef(new SpeechRecognition(c ontext)));
42 speechRecognition->suspendIfNeeded(); 42 speechRecognition->suspendIfNeeded();
43 return speechRecognition.release(); 43 return speechRecognition.release();
44 } 44 }
45 45
46 void SpeechRecognition::start(ExceptionCode& ec) 46 void SpeechRecognition::start(ExceptionCode& ec)
47 { 47 {
48 ASSERT(m_controller); 48 ASSERT(m_controller);
49 if (m_started) { 49 if (m_started) {
50 ec = INVALID_STATE_ERR; 50 ec = InvalidStateError;
51 return; 51 return;
52 } 52 }
53 53
54 setPendingActivity(this); 54 setPendingActivity(this);
55 m_finalResults.clear(); 55 m_finalResults.clear();
56 m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimR esults, m_maxAlternatives); 56 m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimR esults, m_maxAlternatives);
57 m_started = true; 57 m_started = true;
58 } 58 }
59 59
60 void SpeechRecognition::stopFunction() 60 void SpeechRecognition::stopFunction()
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 ASSERT(m_controller); 182 ASSERT(m_controller);
183 183
184 // FIXME: Need to hook up with Page to get notified when the visibility chan ges. 184 // FIXME: Need to hook up with Page to get notified when the visibility chan ges.
185 } 185 }
186 186
187 SpeechRecognition::~SpeechRecognition() 187 SpeechRecognition::~SpeechRecognition()
188 { 188 {
189 } 189 }
190 190
191 } // namespace WebCore 191 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/notifications/NotificationCenter.h ('k') | Source/modules/webaudio/AudioBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698