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

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

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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
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 const HeapVector<Member<SpeechRecognitionResult>>& results) { 38 const HeapVector<Member<SpeechRecognitionResult>>& results) {
39 return new SpeechRecognitionEvent( 39 return new SpeechRecognitionEvent(
40 EventTypeNames::result, resultIndex, 40 EventTypeNames::result, resultIndex,
41 SpeechRecognitionResultList::create(results)); 41 SpeechRecognitionResultList::create(results));
42 } 42 }
43 43
44 SpeechRecognitionEvent* SpeechRecognitionEvent::createNoMatch( 44 SpeechRecognitionEvent* SpeechRecognitionEvent::createNoMatch(
45 SpeechRecognitionResult* result) { 45 SpeechRecognitionResult* result) {
46 if (result) { 46 if (result) {
47 HeapVector<Member<SpeechRecognitionResult>> results; 47 HeapVector<Member<SpeechRecognitionResult>> results;
48 results.append(result); 48 results.push_back(result);
49 return new SpeechRecognitionEvent( 49 return new SpeechRecognitionEvent(
50 EventTypeNames::nomatch, 0, 50 EventTypeNames::nomatch, 0,
51 SpeechRecognitionResultList::create(results)); 51 SpeechRecognitionResultList::create(results));
52 } 52 }
53 53
54 return new SpeechRecognitionEvent(EventTypeNames::nomatch, 0, nullptr); 54 return new SpeechRecognitionEvent(EventTypeNames::nomatch, 0, nullptr);
55 } 55 }
56 56
57 const AtomicString& SpeechRecognitionEvent::interfaceName() const { 57 const AtomicString& SpeechRecognitionEvent::interfaceName() const {
58 return EventNames::SpeechRecognitionEvent; 58 return EventNames::SpeechRecognitionEvent;
(...skipping 18 matching lines...) Expand all
77 m_results(results) {} 77 m_results(results) {}
78 78
79 SpeechRecognitionEvent::~SpeechRecognitionEvent() {} 79 SpeechRecognitionEvent::~SpeechRecognitionEvent() {}
80 80
81 DEFINE_TRACE(SpeechRecognitionEvent) { 81 DEFINE_TRACE(SpeechRecognitionEvent) {
82 visitor->trace(m_results); 82 visitor->trace(m_results);
83 Event::trace(visitor); 83 Event::trace(visitor);
84 } 84 }
85 85
86 } // namespace blink 86 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698