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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp

Issue 2558643004: Remove ContextLifecycleObserver from PresentationConnectionList (Closed)
Patch Set: temp Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 PresentationConnectionList::PresentationConnectionList( 14 PresentationConnectionList::PresentationConnectionList(
15 ExecutionContext* context) 15 ExecutionContext* context)
16 : ContextLifecycleObserver(context) {} 16 : m_executionContext(context) {}
17 17
18 const AtomicString& PresentationConnectionList::interfaceName() const { 18 const AtomicString& PresentationConnectionList::interfaceName() const {
19 return EventTargetNames::PresentationConnectionList; 19 return EventTargetNames::PresentationConnectionList;
20 } 20 }
21 21
22 ExecutionContext* PresentationConnectionList::getExecutionContext() const {
23 return ContextLifecycleObserver::getExecutionContext();
24 }
25
26 const HeapVector<Member<PresentationConnection>>& 22 const HeapVector<Member<PresentationConnection>>&
27 PresentationConnectionList::connections() const { 23 PresentationConnectionList::connections() const {
28 return m_connections; 24 return m_connections;
29 } 25 }
30 26
31 void PresentationConnectionList::addedEventListener( 27 void PresentationConnectionList::addedEventListener(
32 const AtomicString& eventType, 28 const AtomicString& eventType,
33 RegisteredEventListener& registeredListener) { 29 RegisteredEventListener& registeredListener) {
34 EventTargetWithInlineData::addedEventListener(eventType, registeredListener); 30 EventTargetWithInlineData::addedEventListener(eventType, registeredListener);
35 if (eventType == EventTypeNames::connectionavailable) 31 if (eventType == EventTypeNames::connectionavailable)
(...skipping 12 matching lines...) Expand all
48 dispatchEvent(PresentationConnectionAvailableEvent::create( 44 dispatchEvent(PresentationConnectionAvailableEvent::create(
49 EventTypeNames::connectionavailable, connection)); 45 EventTypeNames::connectionavailable, connection));
50 } 46 }
51 47
52 bool PresentationConnectionList::isEmpty() { 48 bool PresentationConnectionList::isEmpty() {
53 return m_connections.isEmpty(); 49 return m_connections.isEmpty();
54 } 50 }
55 51
56 DEFINE_TRACE(PresentationConnectionList) { 52 DEFINE_TRACE(PresentationConnectionList) {
57 visitor->trace(m_connections); 53 visitor->trace(m_connections);
58 ContextLifecycleObserver::trace(visitor); 54 visitor->trace(m_executionContext);
59 EventTargetWithInlineData::trace(visitor); 55 EventTargetWithInlineData::trace(visitor);
60 } 56 }
61 57
62 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698