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

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

Issue 717413002: Use "unsigned" rather than "unsigned long" for C++ code interacting with WebIDL's "unsigned long". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 dispatchEvent(Event::create(EventTypeNames::soundend)); 101 dispatchEvent(Event::create(EventTypeNames::soundend));
102 } 102 }
103 103
104 void SpeechRecognition::didEndAudio() 104 void SpeechRecognition::didEndAudio()
105 { 105 {
106 dispatchEvent(Event::create(EventTypeNames::audioend)); 106 dispatchEvent(Event::create(EventTypeNames::audioend));
107 } 107 }
108 108
109 void SpeechRecognition::didReceiveResults(const HeapVector<Member<SpeechRecognit ionResult> >& newFinalResults, const HeapVector<Member<SpeechRecognitionResult> >& currentInterimResults) 109 void SpeechRecognition::didReceiveResults(const HeapVector<Member<SpeechRecognit ionResult> >& newFinalResults, const HeapVector<Member<SpeechRecognitionResult> >& currentInterimResults)
110 { 110 {
111 unsigned long resultIndex = m_finalResults.size(); 111 size_t resultIndex = m_finalResults.size();
112 112
113 for (size_t i = 0; i < newFinalResults.size(); ++i) 113 for (size_t i = 0; i < newFinalResults.size(); ++i)
114 m_finalResults.append(newFinalResults[i]); 114 m_finalResults.append(newFinalResults[i]);
115 115
116 HeapVector<Member<SpeechRecognitionResult> > results = m_finalResults; 116 HeapVector<Member<SpeechRecognitionResult> > results = m_finalResults;
117 for (size_t i = 0; i < currentInterimResults.size(); ++i) 117 for (size_t i = 0; i < currentInterimResults.size(); ++i)
118 results.append(currentInterimResults[i]); 118 results.append(currentInterimResults[i]);
119 119
120 dispatchEvent(SpeechRecognitionEvent::createResult(resultIndex, results)); 120 dispatchEvent(SpeechRecognitionEvent::createResult(resultIndex, results));
121 } 121 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 visitor->trace(m_grammars); 198 visitor->trace(m_grammars);
199 visitor->trace(m_audioTrack); 199 visitor->trace(m_audioTrack);
200 #if ENABLE(OILPAN) 200 #if ENABLE(OILPAN)
201 visitor->trace(m_controller); 201 visitor->trace(m_controller);
202 #endif 202 #endif
203 visitor->trace(m_finalResults); 203 visitor->trace(m_finalResults);
204 EventTargetWithInlineData::trace(visitor); 204 EventTargetWithInlineData::trace(visitor);
205 } 205 }
206 206
207 } // namespace blink 207 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechRecognition.h ('k') | Source/modules/speech/SpeechRecognitionResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698