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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationConnectionList.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/presentation/PresentationConnectionList.h" 5 #include "modules/presentation/PresentationConnectionList.h"
6 6
7 #include "core/frame/UseCounter.h" 7 #include "core/frame/UseCounter.h"
8 #include "modules/EventTargetModules.h" 8 #include "modules/EventTargetModules.h"
9 #include "modules/presentation/PresentationConnection.h" 9 #include "modules/presentation/PresentationConnection.h"
10 #include "modules/presentation/PresentationConnectionAvailableEvent.h" 10 #include "modules/presentation/PresentationConnectionAvailableEvent.h"
(...skipping 18 matching lines...) Expand all
29 RegisteredEventListener& registeredListener) { 29 RegisteredEventListener& registeredListener) {
30 EventTargetWithInlineData::addedEventListener(eventType, registeredListener); 30 EventTargetWithInlineData::addedEventListener(eventType, registeredListener);
31 if (eventType == EventTypeNames::connectionavailable) 31 if (eventType == EventTypeNames::connectionavailable)
32 UseCounter::count( 32 UseCounter::count(
33 getExecutionContext(), 33 getExecutionContext(),
34 UseCounter::PresentationRequestConnectionAvailableEventListener); 34 UseCounter::PresentationRequestConnectionAvailableEventListener);
35 } 35 }
36 36
37 void PresentationConnectionList::addConnection( 37 void PresentationConnectionList::addConnection(
38 PresentationConnection* connection) { 38 PresentationConnection* connection) {
39 m_connections.append(connection); 39 m_connections.push_back(connection);
40 } 40 }
41 41
42 void PresentationConnectionList::dispatchConnectionAvailableEvent( 42 void PresentationConnectionList::dispatchConnectionAvailableEvent(
43 PresentationConnection* connection) { 43 PresentationConnection* connection) {
44 dispatchEvent(PresentationConnectionAvailableEvent::create( 44 dispatchEvent(PresentationConnectionAvailableEvent::create(
45 EventTypeNames::connectionavailable, connection)); 45 EventTypeNames::connectionavailable, connection));
46 } 46 }
47 47
48 bool PresentationConnectionList::isEmpty() { 48 bool PresentationConnectionList::isEmpty() {
49 return m_connections.isEmpty(); 49 return m_connections.isEmpty();
50 } 50 }
51 51
52 DEFINE_TRACE(PresentationConnectionList) { 52 DEFINE_TRACE(PresentationConnectionList) {
53 visitor->trace(m_connections); 53 visitor->trace(m_connections);
54 visitor->trace(m_executionContext); 54 visitor->trace(m_executionContext);
55 EventTargetWithInlineData::trace(visitor); 55 EventTargetWithInlineData::trace(visitor);
56 } 56 }
57 57
58 } // namespace blink 58 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698